Giter Site home page Giter Site logo

Publish to NPM about keymage HOT 12 CLOSED

piranha avatar piranha commented on July 29, 2024
Publish to NPM

from keymage.

Comments (12)

piranha avatar piranha commented on July 29, 2024

Makes sense. I'll try to get to that soon.

from keymage.

piranha avatar piranha commented on July 29, 2024

Done! Please check if everything's ok for you. :)

from keymage.

StephanHoyer avatar StephanHoyer commented on July 29, 2024

Does not work, since you did not export anything. If you can't get this done, drop me a line, so I can assist

from keymage.

piranha avatar piranha commented on July 29, 2024

Hah, that's funny, sorry. Should be ok now.

from keymage.

StephanHoyer avatar StephanHoyer commented on July 29, 2024

Wow, that was fast... works like a charm 👍 Was in the process of switching to keymaster... but now I'm back.

from keymage.

piranha avatar piranha commented on July 29, 2024

Cool, thanks for feedback, and making me feel that my work is not useless! Hope it'll serve you well, but if anything - don't hesitate to open an issue. :) Or send a pull request FWIW. ;)

from keymage.

StephanHoyer avatar StephanHoyer commented on July 29, 2024

As far as I can say from currently having one key binding in my App, your module works great 👯

Keeping calm when called in node-env would be nice to have. Currently I have to shim this out in my isomorphic application

global.window = {
  addEventListener: function(){}
};
global.navigator = {
  userAgent: ''
};

from keymage.

piranha avatar piranha commented on July 29, 2024

I've made to ignore navigator, but then I'm really not sure what to do with window. Probably just ignoring it is fine... Maybe I should issue a warning or something?

from keymage.

piranha avatar piranha commented on July 29, 2024

I just wonder if that will make someone's life harder by not reporting this error properly.

from keymage.

StephanHoyer avatar StephanHoyer commented on July 29, 2024

maybe I handle this myself. But just in case you want to handle this too, this will do the trick:

if (typeof window !== 'undefined') {
  window.addEventListener('keydown', dispatch, false);
}

from keymage.

piranha avatar piranha commented on July 29, 2024

Yeah, that's understandable (I handled navigator this way), but it's just I'm worried it'll prevent someone from discovering what is the problem. So I think it's better for your app to just explicitly handle this problem, than for keymage to silently not work in an environment which is not suitable.

from keymage.

StephanHoyer avatar StephanHoyer commented on July 29, 2024

yeah sounds reasonable!

from keymage.

Related Issues (13)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.