requireindex is a utility for Node.js CommonJS environments that simplifies the creation of `index.js` files by automatically requiring and exporting sibling modules within a directory. It aggregates modules into a single object, with keys corresponding to file basenames. It supports nested directories, allows explicit file inclusion, and respects a convention for private modules (prefixing with an underscore). The current stable version is 1.2.0, which was last published over 8 years ago, indicating the package is no longer actively maintained. It offers a concise alternative to manually writing multiple `require()` statements for structuring CommonJS projects, though its relevance has diminished with the widespread adoption of ES Modules.
No compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
This package is strictly CommonJS. Attempting to use `import` will result in a runtime error.
The package's core function is intended to be called with `__dirname` to process the current directory and its modules for `module.exports`.
An optional second argument allows specifying an array of basenames to explicitly include, ignoring other files in the directory.
Demonstrates how to use `requireindex` to automatically load and export modules from a directory, including showing how it ignores files prefixed with an underscore.
Breaking-change detection hasn't run for this library yet.
CVE tracking and dependency tree are planned for a later release.
No traffic data recorded yet.