$ npm install 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
© 2010 - cnpmjs.org x YWFE | Home | YWFE