forked from dienianindya/gsi_ess_mobile
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
dienianindya
8bd65e0bb9
|
2 months ago | |
---|---|---|
.. | ||
.npmignore | 2 months ago | |
LICENSE | 2 months ago | |
README.md | 2 months ago | |
index.js | 2 months ago | |
package.json | 2 months ago | |
test.js | 2 months ago |
README.md
glob-slasher
Prefix an object (key/values) of globs with a slash and normalize. Supports negated globs too. Glob version of slasher module
Install
npm install glob-slasher --save
Usage
Strings
var slasher = require('glob-slasher');
var pathname = '!**/something';
console.log(slasher(pathname)); // OUTPUTS: '!/**/something'
Arrays
var slasher = require('glob-slasher');
var globs = ['!**/something', '/here'];
console.log(slasher(globs)); // OUTPUTS: ['!/**/something', '/here']
Objects
var slasher = require('glob-slasher');
var globs = {
'**/some/route': 'index.html'
};
console.log(slasher(globs));
// OUTPUTS:
{
'/**/some/route': '/index.html'
}
Run Tests
npm install
npm test