Skip to content

Latest commit

History

13 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

require-internal Build Status

Import a module, and expose its internals. Primarily intended for testing functions that would normally be hidden, but you can probably also do other kinds of hackery with it.

Note: the internals seem to be read only on v0.10.x. I'm not sure why; if you know, tell me!

Usage

Installation

npm install require-internal

Example

varri=require('require-internal'),myModule=ri.require('./my-module'),myModuleInternals=ri.getInternals(myModule);myModule.something===myModuleInternals.exports.something;myModuleInternals.someHiddenFunction();

See the example/ folder for a bit more clarity.

License

Public domain, see license.txt for details.

About

Test non-exported functions

Resources

Stars

3 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages