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

Allow capitalised names for extensions #11

Open
balupton opened this issue May 29, 2014 · 1 comment
Open

Allow capitalised names for extensions #11

balupton opened this issue May 29, 2014 · 1 comment

Comments

@balupton
Copy link
Member

Not sure how we could do this.

@balupton
Copy link
Member Author

balupton commented Aug 3, 2014

Actually, considering #14 we will need to support more than just capitalised names. I'm considering the following convention:

NAME => [NAME, ALIASES...]
lodash.flatten => [lodash.flatten, lodashflatten, lodashFlatten, flatten]
query-engine => [query-engine, queryEngine, queryengine]

Problem we will need to avoid is duplicates and overrides. Not sure how to handle this. Options are:

  1. Name is the most simple reduced name, instead of the required package name
  2. Or, we track all aliases, and warn on conflicts, a setting that can be turned off but on by default

This would allow us to do things like:

require('chainy').create().require('lodash.flatten set log')
    .set([1,[2,3],4]).flatten().log() // [1,2,3,4]

Very very cool.

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