khrome / card-swipe

An NPM for detecting CC track inputs from streaming character data and for extracting data from them.
MIT License
20 stars 11 forks source link

Fixing type check #2

Closed adamgoose closed 8 years ago

khrome commented 8 years ago

Hey there what was this supposed to fix? It seems like you are substituting some specific framework's type function for the vanilla typeof operator ( https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/typeof ). I think, given a little background, I can come up with a solution that works in all environments.

adamgoose commented 8 years ago

Is this meant to be used inside a particular framework?? I see you requiring type at the top, but it's commented. :/

khrome commented 8 years ago

That commented type include was from the previous version which had 'prime' as a dependency. The current release is vanillajs, so typeof should work. truthfully, typeof would work in both cases, but type() better follows prime's idiom.

adamgoose commented 8 years ago

I gotchya. Ok, so what's the plan, then? Can we just swing with typeof, since you're no longer using prime?

khrome commented 8 years ago

I'll merge and push to NPM today

khrome commented 8 years ago

Published to NPM, with some cleanup to make contributing a little nicer. Thanks!