0.1.0 • Published 8 years ago

ext-to-regex v0.1.0

Weekly downloads
81
License
MIT
Repository
github
Last release
8 years ago

ext-to-regex NPM version NPM downloads Build Status

Create a regex for matching file extensions.

Install

Install with npm:

$ npm install ext-to-regex --save

Usage

var extRegex = require('ext-to-regex');

// pass a string or array of file extensions
console.log(extRegex('.js'));
//=> /\.js$/

console.log(extRegex(['.js', '.md']));
//=> /\.(?:js|md)$/

Related projects

You might also be interested in these projects:

Contributing

Pull requests and stars are always welcome. For bugs and feature requests, please create an issue.

Building docs

Generate readme and API documentation with verb:

$ npm install verb && npm run docs

Or, if verb is installed globally:

$ verb

Running tests

Install dev dependencies:

$ npm install -d && npm test

Author

Jon Schlinkert

License

Copyright © 2016, Jon Schlinkert. Released under the MIT license.


This file was generated by verb, v0.9.0, on May 23, 2016.