spider-stream

0.2.2 • Public • Published

spider stream

npm install spider-stream
var spiderStream = require('spiderStream');
spiderStream('path', ignore).pipe(...);

Give it a path and it will give you a stream of paths that are contained.

If you have a folder called foo, with a bar file and a baz folder in there with a bop file it will be called with foo/bar and foo/baz/bop.

The second argument ignore is an optional way to specify files to ignore, currently the default is to ignore any file or folder that:

  • is named .git
  • is named .DS_Store
  • ends in tilda

Note: expect the default list to increase.

If you pass false then nothing is ignored, passing an array replaces the default one ['.git', '.DS_Store', '*~'] filenames are matched using minimatch, but at the moment, only the name not the full path.

If you pass a function then it will be called on each file with 2 arguments, the filename and the full path, return a truthy value if it should be ignored.

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 0.2.2
    1
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 0.2.2
    1
  • 0.2.1
    0
  • 0.1.0
    1
  • 0.0.1
    0

Package Sidebar

Install

npm i spider-stream

Weekly Downloads

2

Version

0.2.2

License

MIT

Last publish

Collaborators

  • cwmma