0.2.0 • Published 8 years ago

flatten-glob v0.2.0

Weekly downloads
11
License
BSD-4-Clause
Repository
github
Last release
8 years ago

flatten-glob

Return glob applied, flattened and duplicate filtered version of the given list of filenames

Install

$ npm install flatten-glob

Usage

flatGlob = require('flatten-glob')

flatGlob.sync(['foo.js', 'styles/**/*.css', 'templates/index.html', 'templates/**/*.html', '!templates/admin/*.html'])
// => ['foo.js', 'styles/a.css', 'styles/b.css', 'templates/index.html', 'templates/foo.html', 'templates/bar.html']

flatGlob(['foo.js', 'styles/**/*.css', 'templates/index.html', 'templates/**/*.html', '!templates/admin/*.html'], function (error, files) {
  if (error) throw error
  
  files
  // => ['foo.js', 'styles/a.css', 'styles/b.css', 'templates/index.html', 'templates/foo.html', 'templates/bar.html']
})

Testing

$ npm install -g mocha
$ mocha test.js
0.2.0

8 years ago

0.1.3

8 years ago

0.1.2

8 years ago

0.1.1

8 years ago

0.1.0

8 years ago

0.0.1

9 years ago