# path2glob **Repository Path**: mirrors_floatdrop/path2glob ## Basic Information - **Project Name**: path2glob - **Description**: Get best matching glob from globs array for given path - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2020-09-24 - **Last Updated**: 2026-05-17 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # path2glob [![NPM version][npm-image]][npm-url] [![Build Status][travis-image]][travis-url] [![Dependency Status][depstat-image]][depstat-url] __Deprecated: use [anymatch](https://github.com/es128/anymatch) for this__ Get best matching glob from globs array for given path. > __Tip__: negatives will be filtered ## Usage ```js 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 [npm-url]: https://npmjs.org/package/path2glob [npm-image]: http://img.shields.io/npm/v/path2glob.svg?style=flat [travis-url]: http://travis-ci.org/floatdrop/path2glob [travis-image]: http://img.shields.io/travis/floatdrop/path2glob.svg?branch=master&style=flat [depstat-url]: https://david-dm.org/floatdrop/path2glob [depstat-image]: http://img.shields.io/david/floatdrop/path2glob.svg?style=flat