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

[Feature Request] modular exports #23

Open
radiovisual opened this issue Jan 4, 2017 · 0 comments
Open

[Feature Request] modular exports #23

radiovisual opened this issue Jan 4, 2017 · 0 comments

Comments

@radiovisual
Copy link

radiovisual commented Jan 4, 2017

It would be really nice to have the ability to just pull in the methods you need, instead of pulling in the entire library for a single method. I have a situation where I only need the numberFormat section, which is 10 lines of code, but to get at it, I need to pull in the entire library, adding unnecessary bloat. These days, when building mobile apps, every byte counts.

As suggested in issue #19, it would be really cool to have the abilty to choose the individual method you want via the destructing syntax:

import { date } from 'humanize';

or you can go the same route as lodash, with individual module exports, so that you can require them in by name:

import date from 'humanize/date';
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

1 participant