glob-slasher
Prefix an object (key/values) of globs with a slash and normalize. Supports negated globs too. Glob version of slasher module
Last updated 10 years ago by scottcorgan .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ gnpm install glob-slasher 
SYNC missed versions from official npm registry.

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

Current Tags

  • 1.0.1                                ...           latest (10 years ago)

2 Versions

  • 1.0.1                                ...           10 years ago
  • 1.0.0                                ...           10 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (3)
Dev Dependencies (2)
Dependents (1)

Copyright 2013 - present © cnpmjs.org | Home |