regexp-clone

Clone RegExps with options

npm install regexp-clone
1 608 downloads in the last day
17 467 downloads in the last week
74 335 downloads in the last month

regexp-clone

==============

Clones RegExps with flag preservation

var regexpClone = require('regexp-clone');

var a = /somethin/g;
console.log(a.global); // true

var b = regexpClone(a);
console.log(b.global); // true

License

MIT

npm loves you