globject

1.0.2 • Public • Published

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

/globject/

    Package Sidebar

    Install

    npm i globject

    Weekly Downloads

    565

    Version

    1.0.2

    License

    MIT

    Last publish

    Collaborators

    • scottcorgan