aseemk / requireDir

Node.js helper to require() directories.
MIT License
484 stars 60 forks source link

support for params #37

Closed matiasgabrielgarcia closed 6 years ago

matiasgabrielgarcia commented 8 years ago

Support for params through apply for function modules.

Example:

require('require-dir')('./tasks',{'params':[someArg1, someArg2, someArg3]});
aseemk commented 7 years ago

Hi there,

I'm sorry I haven't been timely in responding to these issues and PRs.

If you're interested in taking over the maintainer role for this project, please let me know.

More details: https://github.com/aseemk/requireDir/pull/31#issuecomment-255744987

Cheers, Aseem

yocontra commented 6 years ago

Hi - new maintainer here. I don't think this is a feature we'll add, you should be able to solve this problem with the new mapKey/mapValue/filter functions. mapValue(fn) { return fn(args); } should work fine for this case.