1.0.2 • Published 9 years ago

globject v1.0.2

Weekly downloads
686
License
MIT
Repository
github
Last release
9 years ago

globject

Get values by glob-like keys

Install

npm install globject --save

Usage

var globject = require('globject');
var routes = {
  '**/about/**': 'about.html',
  '**': 'index.html'
};

var routesObj = globject(routes);

console.log(routesObj('/about/somepage.html')); // OUTPUTS: about.html
console.log(routesObj('/any/route.html'')); // OUTPUTS: index.html

Run Tests

npm install
npm test
1.0.2

9 years ago

1.0.1

10 years ago

1.0.0

11 years ago

0.1.3

11 years ago

0.1.2

11 years ago

0.1.1

11 years ago

0.1.0

11 years ago