@zppack/glob

1.0.1 • Public • Published

@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

How to contribute to this?

Recently changes

See the change log.

License

MIT

Package Sidebar

Install

npm i @zppack/glob

Weekly Downloads

0

Version

1.0.1

License

MIT

Unpacked Size

6.2 kB

Total Files

5

Last publish

Collaborators

  • johnch