Files
NapCatQQ/.pnpm-store/v3/files/11/ee97dbc31c63ec2ef673d83ba6de25fa47848deae5a3e91bec42eec3529107437c3b0abfeb4867657f851a62e8f729bc2884ce6bde7234c5f014b3d407be41
T
TanTan e311ca3275
Build NapCat Artifacts / Type Check & Test (push) Waiting to run
docs: 仓库链接指向本镜像仓库
2026-11-13 09:25:58 +08:00

18 lines
437 B
Plaintext

/** Used to match `RegExp` flags from their coerced string values. */
var reFlags = /\w*$/;
/**
* Creates a clone of `regexp`.
*
* @private
* @param {Object} regexp The regexp to clone.
* @returns {Object} Returns the cloned regexp.
*/
function cloneRegExp(regexp) {
var result = new regexp.constructor(regexp.source, reFlags.exec(regexp));
result.lastIndex = regexp.lastIndex;
return result;
}
export default cloneRegExp;