Adds module-relative 'resolve' method to the Module class
Want to see pretty graphs? Log in now!
npm install module_resolve
|1||downloads in the last month|
|Last Published By|
|Version||0.1.1 last updated 2 years ago|
Adds a resolve(path) method to the Module prototype.
Node.js has a pretty powerful and intuitive resource path resolution algorithm, which is useful for other things besides source files. To use it for looking-up other files, we need to be able to lookup relative to the module from which the file is being sought. This patches in that functionality using private methods of the Module object, so it's not an ideal solution.
A better solution would be for node.js to integrate this method. Even better would be if it provided a async implementation as well.
See bug 3285.