The `dir` package, version 0.1.2, provides a utility for Node.js to inspect objects in a 'Firebug-like' manner. Published over a decade ago, its primary goal was to offer more comprehensive object inspection, including prototype chain traversal, than Node.js's built-in `util.inspect` at the time. Unlike `util.inspect`, it aimed to return a real object for shell integration and better-colored output, even monkey-patching `console.dir`. The package has seen no updates since its initial release and is considered abandoned, with modern Node.js `console.dir` and `util.inspect` offering robust and actively maintained alternatives that supersede its original functionality. It is not compatible with modern ESM environments without additional tooling.
Verified import paths — ran on the pinned version, not inferred.
This package is a CommonJS module and must be imported using `require()` in Node.js environments. Direct ESM `import` statements will fail.
The package monkey-patches the global `console.dir` when `require('dir')` is executed. This behavior is specific to CommonJS and will not occur with ESM `import` statements.
Demonstrates importing the `dir` utility and using it for inspecting various JavaScript objects, including a custom class instance, a function, and a native Date object. It also shows the effect of its `console.dir` monkey-patch.
Breaking-change detection hasn't run for this library yet.
CVE tracking and dependency tree are planned for a later release.