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

Remove underscore as dependency #5

Merged
merged 1 commit into from
May 3, 2016
Merged

Remove underscore as dependency #5

merged 1 commit into from
May 3, 2016

Conversation

rreusser
Copy link
Contributor

@rreusser rreusser commented Apr 28, 2016

Love this module! Thanks for making this!

This might be a little heavy-handed—apologies!—but this PR removes underscore as a dependency (kept as devDependency) since only two functions were used. This reduces the minified bundle size from 38kb to 14kb.

Changes:

  • _.every is just a loop with a break. Slightly more verbose, but maybe offset by saving 24kb 😄
  • _.unique is replaced with compute-unique, which does precisely the same thing with only slightly different semantics.

Again, I really don't mean to be the style police, but thought perhaps the bundle size savings were worthwhile. Thanks!

@rsandor rsandor merged commit a9d18c0 into rsandor:master May 3, 2016
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

Successfully merging this pull request may close these issues.

None yet

2 participants