capaj / require-globify

transform for browserify, which allows to require files with globbing expressions
MIT License
70 stars 11 forks source link

mode:list would be a good feature #17

Closed epoberezkin closed 9 years ago

epoberezkin commented 9 years ago

Because maps are not ordered and it would be good to retain the order of files returned by glob. At the moment I either have to convert the hash to array (with no guarantee of having the same order) or to provide a custom function.

Instead of hash it would return the array of objects with properties, for example, "name" and "module".

call-a3 commented 9 years ago

Ok, I'll add this in the next release.

epoberezkin commented 9 years ago

great, thanks

call-a3 commented 9 years ago

Should be there, can you test it and let me know if it works for you? How important is the order of the matches? (because right now matches are sorted to ensure consistency)

epoberezkin commented 9 years ago

Works beautifully, I replaced :) Thank you! https://github.com/epoberezkin/ajv/commit/73b21e0383cc4efd20567b28e27992685e5b2748