Skip to content

jamestalmage/node-modules-regexp

master
Switch branches/tags
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

node-modules-regexp Build Status

A regular expression for file paths that contain a node_modules folder.

Install

$ npm install --save node-modules-regexp

Usage

let nodeModules = require('node-modules-regexp');

// alternate string export
let nodeModulesString = require('node-modules-regexp/string');
nodeModules = new RegExp(nodeModulesString);


nodeModules.test('/foo/node_modules/bar.js');
//=> true

nodeModules.test('/foo/bar.js');
//=> false

API

The returned value is a regular expression, soooo.....

License

MIT © James Talmage

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published