path2glob
Get best matching glob from globs array for given path
Last updated 12 years ago by floatdrop .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install path2glob 
SYNC missed versions from official npm registry.

path2glob

NPM version Build Status Dependency Status

Get best matching glob from globs array for given path.

Tip: negatives will be filtered

Usage

var path2glob = require('path2glob');

var globs = [
    './libs/**/*.js',
    './libs/src/**/*.js',
];

console.log(path2glob('/User/someone/libs/bird/word.js', globs)); // './libs/**/*.js'
console.log(path2glob('/User/someone/libs/src/word.js', globs)); // './libs/src/**/*.js'

API

path2glob(path, globs, [opts])

Returns best matching glob from globs array.

License

MIT (c) 2014 Vsevolod Strukchinsky

Current Tags

  • 0.0.2                                ...           latest (12 years ago)

2 Versions

  • 0.0.2                                ...           12 years ago
  • 0.0.1                                ...           12 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 1
Last Day 0
Last Week 1
Last Month 1
Dependencies (1)
Dev Dependencies (2)
Dependents (1)

Copyright 2013 - present © cnpmjs.org | Home |