Skip to content

a function that takes a series of regular expressions and returns them in concatenated form

Notifications You must be signed in to change notification settings

michaelrhodes/concat-regexp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

a function that takes a series of regular expressions and returns them in concatenated form

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages