mirror of
https://github.com/nodejs/node.git
synced 2026-11-30 11:45:32 -05:00
PR-URL: https://github.com/nodejs/node/pull/8928 Reviewed-By: Myles Borins <myles.borins@gmail.com> Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
fstream-npm
This is an fstream DirReader class that will read a directory and filter things according to the semantics of what goes in an npm package.
For example:
// This will print out all the files that would be included
// by 'npm publish' or 'npm install' of this directory.
var FN = require("fstream-npm")
FN({ path: "./" })
.on("child", function (e) {
console.error(e.path.substr(e.root.path.length + 1))
})