Bachir Soussi Chiadmi 0611418f7a added whole system from ola4doc | 7 年之前 | |
---|---|---|
.. | ||
LICENSE | 7 年之前 | |
README.md | 7 年之前 | |
index.js | 7 年之前 | |
package.json | 7 年之前 |
Package | glob2base |
Description | Extracts a base path from a node-glob instance |
Node Version | >= 0.10 |
The module is a function that takes in a node-glob instance and returns a string. Basically it just gives you everything before any globbing/matching happens.
var glob2base = require('glob2base');
var glob = require('glob');
// js/
glob2base(new glob.Glob('js/**/*.js'));
// css/test/
glob2base(new glob.Glob('css/test/{a,b}/*.css'));
// pages/whatever/
glob2base(new glob.Glob('pages/whatever/index.html'));