MCPcopy
hub / github.com/ajaxorg/ace / cloneRegExp

Function cloneRegExp

lib/ace/mode/javascript/jshint.js:1202–1206  ·  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

1200 * @returns {Object} Returns the cloned regexp.
1201 */
1202function cloneRegExp(regexp) {
1203 var result = new regexp.constructor(regexp.source, reFlags.exec(regexp));
1204 result.lastIndex = regexp.lastIndex;
1205 return result;
1206}
1207
1208/**
1209 * Creates a clone of `set`.

Callers 1

initCloneByTagFunction · 0.85

Calls 1

execMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…