See formal docs over @ http://cdaringe.github.io/mock-npm-install/index.html
mock-npm-install
Install or remove a dummy package into a node_modules/ folder. All actions are synchronous, at the moment!
usage
var mockPackage = require('mock-npm-install');
var mock1 = mockPackage.install(); //=> node_modules/mock_package_1 now exists w/ package.json
mockPackage.remove({ name: mock1.name }); //=> removes the pkg folderapi
install(opts), returns package.json js objnodeModulesDir, defaults to the current dir's node_modules folderpackage, defaults to generic package.json equivalent js object. any object added here has the generic contentdefaulted on to it
remove(opts)nameshould correspond to folder removed in node_modulesnodeModulesDir, defaults to the current dir's node_modules folder
todo
enable async.