Initial Commit

This commit is contained in:
2020-07-08 15:37:09 +02:00
commit 549ecd137f
1746 changed files with 292109 additions and 0 deletions

27
node_modules/regexp-clone/index.js generated vendored Normal file
View File

@@ -0,0 +1,27 @@
const toString = Object.prototype.toString;
function isRegExp (o) {
return 'object' == typeof o
&& '[object RegExp]' == toString.call(o);
}
module.exports = exports = function (regexp) {
if (!isRegExp(regexp)) {
throw new TypeError('Not a RegExp');
}
const flags = [];
if (regexp.global) flags.push('g');
if (regexp.multiline) flags.push('m');
if (regexp.ignoreCase) flags.push('i');
if (regexp.dotAll) flags.push('s');
if (regexp.unicode) flags.push('u');
if (regexp.sticky) flags.push('y');
const result = new RegExp(regexp.source, flags.join(''));
if (typeof regexp.lastIndex === 'number') {
result.lastIndex = regexp.lastIndex;
}
return result;
}