El Mehdi Touimi Benjelloun 015b74845c First commit | 5 years ago | |
---|---|---|
.. | ||
test | 5 years ago | |
.npmignore | 5 years ago | |
.travis.yml | 5 years ago | |
History.md | 5 years ago | |
LICENSE | 5 years ago | |
Makefile | 5 years ago | |
README.md | 5 years ago | |
index.js | 5 years ago | |
package.json | 5 years ago |
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