MCPcopy Create free account
hub / github.com/RubyLouvre/anu / cloneRegExp

Function cloneRegExp

test/babel.js:52298–52302  ·  view source on GitHub ↗

* Creates a clone of `regexp`. * * @private * @param {Object} regexp The regexp to clone. * @returns {Object} Returns the cloned regexp.

(regexp)

Source from the content-addressed store, hash-verified

52296 * @returns {Object} Returns the cloned regexp.
52297 */
52298 function cloneRegExp(regexp) {
52299 var result = new regexp.constructor(regexp.source, reFlags.exec(regexp));
52300 result.lastIndex = regexp.lastIndex;
52301 return result;
52302 }
52303
52304 module.exports = cloneRegExp;
52305

Callers 1

initCloneByTagFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected