Require all files within a directory with support for filtering, mapping, parsing, and dash-to-camelCase conversion. Version 0.0.9 is the latest stable release; it is a small utility library that works with transpiler runners using require-extensions and supports NODE_PATH. It offers recursive scanning with a flat option and partially applicable configuration. Differentiators include built-in camelization and extensible extensions list compared to similar directory require tools.
npm install deep-requireNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows how to require a directory with filtering, camelization, and custom map function.
Ensure you invoke the returned function: const modules = deepRequire(options)(dir);
Do not use in performance-critical or large-directory contexts; consider alternatives like glob or fs.readdirSync wrapper.
Pass recursive: true or recursive: 'flat' in options.
Invoke the returned function with a directory path: const result = deepRequire(options)(dir);
Run npm install deep-require --save and ensure the require path is correct.
Check that the directory path is correct and exists relative to the current working directory.
No dependency data recorded yet.