sugar-glob

2.0.0 • Public • Published

sugar-glob

Find files using glob with a little added sugar

Install

npm install sugar-glob

Usage

var scan = require('sugar-glob')
 
scan({
  root: './my-folder' // relative to this file or absolute path
})
.file('**/*.html', function(file) {
  console.log(file)
})

Outputs the following for each file matching the pattern:

{ name: 'abc/my-file.html',
  dir: 'abc',
  basename: 'my-file.html',
  dirname: '/Users/will123195/my-folder/abc',
  extname: '.html',
  filename: '/Users/will123195/my-folder/abc/my-file.html' }

Readme

Keywords

Package Sidebar

Install

npm i sugar-glob

Weekly Downloads

44

Version

2.0.0

License

MIT

Last publish

Collaborators

  • will123195