{"_id":"clone-regexp@4.0.0","bugs":{"url":"https://github.com/sindresorhus/clone-regexp/issues"},"dist":{"shasum":"793964c5744962dda3dc15a0a73950cb8a2eadbb","tarball":"http://registry-npm.ywwl.com/clone-regexp/download/clone-regexp-4.0.0.tgz","fileCount":5,"integrity":"sha512-LKD6JlIoEBoUER3cM1L9/1DLYWhbvIq6uX2DQqKaXjqbovfbQ99B1Ey7CCjUaak2h7cooiX9YafateLo/oWZkg==","signatures":[{"sig":"MEQCICPg34IVu1qYDOpeY8WeR9Mt9AWcm3//vXZaKhUfbKTHAiBboQF/K+oY4Zah0xFB+osLUJ5n/aARGnO5ZLmmHPMRzg==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQDOVcQJ4gGupjuHd4lAxh1xqr+RLAufW7iFUmSWW+jNvAIgVNpena/PNZwMv7eOvvqfpMVsIYmd/ygXCeZNbNU5u9s="}],"unpackedSize":7586,"size":2557,"noattachment":false,"key":"/clone-regexp/-/clone-regexp-4.0.0.tgz"},"name":"clone-regexp","type":"module","types":"./index.d.ts","author":{"url":"https://sindresorhus.com","name":"Sindre Sorhus","email":"sindresorhus@gmail.com"},"engines":{"node":">=22"},"exports":{"types":"./index.d.ts","default":"./index.js"},"funding":"https://github.com/sponsors/sindresorhus","gitHead":"fdd350a1816d28c8170c5f65bdecf4b28e4a0b72","license":"MIT","scripts":{"test":"xo && node --test && nz"},"version":"4.0.0","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"homepage":"https://github.com/sindresorhus/clone-regexp#readme","keywords":["regexp","regex","regular","expression","clone","duplicate","modify","mutate"],"repository":{"url":"git+https://github.com/sindresorhus/clone-regexp.git","type":"git"},"_npmVersion":"12.2.0","description":"Clone and modify a RegExp instance","directories":{},"maintainers":[{"name":"sindresorhus","email":"sindresorhus@gmail.com"}],"sideEffects":false,"_nodeVersion":"26.11.1","_hasShrinkwrap":false,"devDependencies":{"nz":"^0.1.0","xo":"^5.0.1","@typescript/native":"npm:typescript@^7.0.2"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/clone-regexp_4.0.0_1791873625346_0.12379319109037645"},"readme":"# clone-regexp\n\n> Clone and modify a [RegExp](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp) instance\n\n## Install\n\n```sh\nnpm install clone-regexp\n```\n\n## Usage\n\n```js\nimport cloneRegexp from 'clone-regexp';\n\nconst regex = /[a-z]/gi;\n\ncloneRegexp(regex);\n//=> /[a-z]/gi\n\ncloneRegexp(regex) === regex;\n//=> false\n\ncloneRegexp(regex, {global: false});\n//=> /[a-z]/i\n\ncloneRegexp(regex, {multiline: true});\n//=> /[a-z]/gim\n\ncloneRegexp(regex, {source: 'unicorn'});\n//=> /unicorn/gi\n```\n\n## API\n\n### cloneRegexp(regexp, options?)\n\n#### regex\n\nType: `RegExp`\n\nRegex to clone.\n\n#### options\n\nType: `object`\\\nProperties: [`source`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp/source) [`hasIndices`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp/hasIndices) [`global`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp/global) [`ignoreCase`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp/ignoreCase) [`multiline`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp/multiline) [`dotAll`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp/dotAll) [`sticky`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp/sticky) [`unicode`](http://norbertlindenberg.com/2012/05/ecmascript-supplementary-characters/#RegExp) [`unicodeSets`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp/unicodeSets) [`lastIndex`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp/lastIndex)\n\nOptionally modify the cloned `RegExp` instance.\n","publish_time":1791873625436,"_cnpm_publish_time":1791873625436,"dist-tags":{"latest":"4.0.0"}}