clone RegExps with flag preservation
JavaScript
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
test
.gitignore
.travis.yml
History.md
LICENSE
Makefile
README.md
index.js
package.json

README.md

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