1.0.1 • Published 3 years ago

@zppack/glob v1.0.1

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

@zppack/glob

An expand package of node-glob.

Features

  • glob (glob.sync)
  • glob.union, glob.intersection, glob.difference
  • 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

How to contribute to this?

Recently changes

See the change log.

License

MIT