finddown-sync
Recursive downward search for all files matching a given pattern from the current directory and child directories
Last updated 4 years ago by chan1ks .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install finddown-sync 
SYNC missed versions from official npm registry.

finddown-sync npm version Build Status

Find all files matching a given pattern in the current directory or child directories. The sibling and opposite function to findup-sync.

Matching is done with micromatch, please report any matching related issues on that repository.

Install with npm

$ npm install --save finddown-sync

Usage

var findDown = require('finddown-sync');
findDown(patternOrPatterns [, micromatchOptions]);

// Start looking in the CWD.
var filepath1 = findDown('{a,b}*.txt');

// Start looking somewhere else, and ignore case.
var filepath2 = findDown('{a,b}*.txt', {cwd: '/some/path', nocase: true});

// Start looking somewhere else, and ignore specific files or directories.
var filepath3 = findDown('{a,b}*.txt', {cwd: '/some/path', exclude: ['directory/', 'some.file']});
  • patterns {String|Array}: Glob pattern(s) or file path(s) to match against.
  • options {Object}: Options to pass to micromatch and exclude-match. Note that if you want to start in a different directory than the current working directory, specify a cwd property here. Files and Directories can be excluded by specifying an exclude property.
  • returns {Array}: Returns a list of matching files.

Running tests

Install dev dependencies:

$ npm install -d && npm test

Contributing

Take care to maintain the existing coding style. Add unit tests for any new or changed functionality.

For bugs or feature requests, please create an issue.

Release History

2016-10-06 - v1.0.2 - Modified CI build config.
2016-10-06 - v1.0.1 - Updated README build status.
2016-10-06 - v1.0.0 - Updated README. Refactored for [exclusion-match].
2016-10-01 - v0.2.0 - Updated dependencies. Deprecated exclude function and moved it into a separate dependency.
2016-09-20 - v0.1.0 - Initial release.

Author

"Captain" Morgan Worrell

License

Copyright © 2016, "Captain" Morgan Worrell.
Released under the MIT license.

Current Tags

  • 1.0.2                                ...           latest (4 years ago)

3 Versions

  • 1.0.2                                ...           4 years ago
  • 1.0.1                                ...           4 years ago
  • 1.0.0                                ...           4 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 1
Last Day 0
Last Week 0
Last Month 0
Dependencies (6)
Dev Dependencies (5)

Copyright 2014 - 2016 © taobao.org |