Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

messaging #10

Closed
jdalton opened this issue Sep 22, 2016 · 12 comments
Closed

messaging #10

jdalton opened this issue Sep 22, 2016 · 12 comments

Comments

@jdalton
Copy link

jdalton commented Sep 22, 2016

Hi @juliangruber!

With IE < 11 no longer supported by MS & IE 8 being the last browser that needed Array.isArray would you be up for adding a npm deprecate message encouraging folks to use Array.isArray?

@juliangruber
Copy link
Owner

yeah, according to http://caniuse.com/usage-table IEs<9 make up only 0.6% of the browser marker. I'd be down with publishing a new major with the deprecation warning...just so we don't annoy the ecosystem of modules already depending on this, but don't encourage any new modules written to use this. sounds good?

@jdalton
Copy link
Author

jdalton commented Sep 23, 2016

Sounds great!

@kgryte
Copy link

kgryte commented Sep 23, 2016

@juliangruber I would recommend against deprecating. People may use this module for reasons other than just as a polyfill. For example, because they prefer a) a more functional approach, b) an approach more amenable to proxying during tests, and c), more generally, dependency injection over globals.

@jdalton
Copy link
Author

jdalton commented Sep 23, 2016

@kgryte I think that extends past the scope and general use of this package. I suspect folks grab for things like isarray because they don't know it's available in the language.

@kgryte
Copy link

kgryte commented Sep 23, 2016

@jdalton Without any statistics to back up your claim regarding general use, that is your opinion. I use this module and others like it for the reasons I mentioned earlier and I am fully aware that Array.isArray is available in the language.

@jdalton
Copy link
Author

jdalton commented Sep 24, 2016

@kgryte You can always use v1 of this package.

@juliangruber
Copy link
Owner

I'm with @jdalton here, Array.isArray is javascript. If you do want to avoid all globals (except for the module system which you can't avoid anyways), I suggest you check out https://github.com/raynos/global.

@juliangruber
Copy link
Owner

@jdalton should we deprecate in code or in npm? I feel like npm is cleaner.

@rands0n
Copy link

rands0n commented Sep 24, 2016

@kgryte I agree with you, in my case I like a more functional approach. And I put this part of package in util. In my case I need support of IE < 9.

You can check it out the util version that I use here. From now on(if the project dont need old browsers :D), I would use Array.isArray from Javascript.

@jdalton
Copy link
Author

jdalton commented Sep 24, 2016

@juliangruber

should we deprecate in code or in npm? I feel like npm is cleaner.

The npm route 👍 . In my mind it would be a combo of an up front readme notice and an npm deprecate message.

That said, I guess the code could be simplified to module.exports = Array.isArray too.

@juliangruber
Copy link
Owner

Published isarray@2.0.0 with deprecation message "Just use Array.isArray directly". Thanks @jdalton!

@jdalton
Copy link
Author

jdalton commented Sep 24, 2016

🤘 I'll deprecate lodash.isarray too!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants