globject
Get values by glob-like keys
Last updated 12 years ago by scottcorgan .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ npm install globject 
SYNC missed versions from official npm registry.

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

Current Tags

  • 1.0.2                                ...           latest (10 years ago)

7 Versions

  • 1.0.2                                ...           10 years ago
  • 1.0.1                                ...           12 years ago
  • 1.0.0                                ...           12 years ago
  • 0.1.3                                ...           13 years ago
  • 0.1.2                                ...           13 years ago
  • 0.1.1                                ...           13 years ago
  • 0.1.0                                ...           13 years ago
Maintainers (1)
Downloads
Total 22
Today 7
This Week 13
This Month 22
Last Day 0
Last Week 9
Last Month 0
Dependencies (1)
Dev Dependencies (2)

© 2010 - cnpmjs.org x YWFE | Home | YWFE