concat-regexp

0.0.6 • Public • Published

concat-regexp

concat-regexp is a function that takes a series of regular expressions (as String and/or RegExp objects) and returns them in concatenated form.

Build status

Browser support

Install

$ npm install concat-regexp

Example

var concat = require('concat-regexp')
 
var username = 'alice'
concat(/^\/users\//, username, /\/?/, RegExp('$', 'i'))
// => /^\/users\/alice\/?$/i

License

MIT

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 0.0.6
    271
    • latest

Version History

Package Sidebar

Install

npm i concat-regexp

Weekly Downloads

272

Version

0.0.6

License

MIT

Last publish

Collaborators

  • michaelrhodes