1.2.0 • Published 6 years ago

glob-adapter v1.2.0

Weekly downloads
1
License
ISC
Repository
github
Last release
6 years ago

glob-adapter

same interface for different glob implementations

Usage

const adapter = require('glob-adapter').adapter;

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

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


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

// fast-glob (default)
const fastGlob = adapter('fast-glob');
const res = await fastGlob.read('./*.js');
console.log(res); // ['file1.js', 'file2.js']
1.2.0

6 years ago

1.1.0

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago