@zppack/glob
An expand package of node-glob.
Features
- [x] glob (glob.sync)
- [x] glob.union, glob.intersection, glob.difference
- [x] glob minimatch rule with starting char "!" to exclude files
Start
Install
npm install --save @zppack/glob
Usage
import glob from '@zppack/glob';
// following two expressions have same results
glob.union(['**/*', '!.gitignore', '!.git/**', '!node_modules/**'], { dot: true, cwd: path.resolve(__dirname), nodir: true, realpath: true });
glob.difference(['**/*', '.gitignore', '.git/**', 'node_modules/**'], { dot: true, cwd: path.resolve(__dirname), nodir: true, realpath: true });
// intersection mode
glob.intersection(['*.js', 'glob.*']); // result will be `glob.js` only.
options
Options is the same as node-glob
options.
Contributing
Recently changes
See the change log.