concat-regexp

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

MIT 7 个版本
安装
npm install concat-regexp
yarn add concat-regexp
pnpm add concat-regexp
bun add concat-regexp
README

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

版本列表
0.0.6 2014-11-18
0.0.5 2014-11-18
0.0.4 2014-09-28
0.0.3 2014-09-28
0.0.2 2014-09-28
0.0.1 2013-11-01
0.0.0 2013-11-01