npm.io
1.1.2 • Published 8 years agoCLI

easy-glob

Licence
MIT
Version
1.1.2
Deps
4
Size
7 kB
Vulns
0
Weekly
0
Stars
1

Build Status

easy-glob

simple and easy to use glob with instant results using fast-glob as backend and is faster than node-glob.

Usage

Node

const glob = require('easy-glob');

// async / await
const res = await glob.read('./*.js');
console.log(res); // ['file1.js', 'file2.js']

// sync
const syncRes = glob.readSync('./*.js');
console.log(syncRes); // ['file1.js', 'file2.js']

// promise
glob.read('./*.js')
  .then(result => console.log(result)) // ['file1.js', 'file2.js']
CLI
$ glob <pattern> [options]
$ glob read <pattern> [options]
$ glob readSync <pattern> [options]

# Examples
$ glob "./*"
$ glob "./**/*.js, src/"

Keywords