node package manager
Easy sharing. Manage teams and permissions with one click. Create a free org »

regexp-clone

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