Bones/node_modules/glob-parent
SOUTHERNCO\x2mjbyrn 7efe7605b8 Template Upload
2017-05-17 13:45:25 -04:00
..
.npmignore Template Upload 2017-05-17 13:45:25 -04:00
.travis.yml Template Upload 2017-05-17 13:45:25 -04:00
index.js Template Upload 2017-05-17 13:45:25 -04:00
LICENSE Template Upload 2017-05-17 13:45:25 -04:00
package.json Template Upload 2017-05-17 13:45:25 -04:00
README.md Template Upload 2017-05-17 13:45:25 -04:00
test.js Template Upload 2017-05-17 13:45:25 -04:00

glob-parent Build Status Coverage Status

Javascript module to extract the non-magic parent path from a glob string.

NPM NPM

Usage

npm install glob-parent --save
var globParent = require('glob-parent');

globParent('path/to/*.js'); // 'path/to'
globParent('/root/path/to/*.js'); // '/root/path/to'
globParent('/*.js'); // '/'
globParent('*.js'); // '.'
globParent('**/*.js'); // '.'
globParent('path/{to,from}'); // 'path'
globParent('path/!(to|from)'); // 'path'
globParent('path/?(to|from)'); // 'path'
globParent('path/+(to|from)'); // 'path'
globParent('path/*(to|from)'); // 'path'
globParent('path/@(to|from)'); // 'path'
globParent('path/**/*'); // 'path'

// if provided a non-glob path, returns the nearest dir
globParent('path/foo/bar.js'); // 'path/foo'
globParent('path/foo/'); // 'path/foo'
globParent('path/foo'); // 'path' (see issue #3 for details)

Change Log

See release notes page on GitHub

License

ISC