glob-parent
Javascript module to extract the non-magic parent path from a glob string.
Usage
npm install glob-parent --save
var globParent = require('glob-parent');
globParent('path/to/*.js');
globParent('/root/path/to/*.js');
globParent('/*.js');
globParent('*.js');
globParent('**/*.js');
globParent('path/{to,from}');
globParent('path/!(to|from)');
globParent('path/?(to|from)');
globParent('path/+(to|from)');
globParent('path/*(to|from)');
globParent('path/@(to|from)');
globParent('path/**/*');
globParent('path/foo/bar.js');
globParent('path/foo/');
globParent('path/foo');
Change Log
See release notes page on GitHub
License
ISC