{"_id":"regexp-clone","_rev":"11-945b0085cc2044028977aa7cb5a9d618","name":"regexp-clone","dist-tags":{"latest":"1.2.0"},"versions":{"0.0.1":{"name":"regexp-clone","version":"0.0.1","keywords":["RegExp","clone"],"author":{"name":"Aaron Heckmann","email":"aaron.heckmann+github@gmail.com"},"license":"MIT","_id":"regexp-clone@0.0.1","maintainers":[{"name":"aaron","email":"aaron.heckmann+github@gmail.com"}],"dist":{"shasum":"a7c2e09891fdbf38fbb10d376fb73003e68ac589","tarball":"https://registry.npmjs.org/regexp-clone/-/regexp-clone-0.0.1.tgz","integrity":"sha512-tfYXF0HXEYh3AtgdjqNLQ8+tmZSAKIS7KtOjmB1laJgfbsi+Lf2RVNwLZVOE3U27yBXikzQuIXglLlakvb8Thw==","signatures":[{"sig":"MEYCIQDIEIpmjZthEi+PHCbGGwHTOi9j34Se0P/ByBwUoy9bXQIhAPpwgjs2kDkGLNBjGdPfAkqK7XhW9kT5HGP5hMSCi4FC","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"index.js","_from":".","scripts":{"test":"make test"},"_npmUser":{"name":"aaron","email":"aaron.heckmann+github@gmail.com"},"repository":{"url":"git://github.com/aheckmann/regexp-clone.git","type":"git"},"_npmVersion":"1.2.14","description":"Clone RegExps with options","directories":{},"readmeFilename":"README.md","devDependencies":{"mocha":"1.8.1"}},"1.0.0":{"name":"regexp-clone","version":"1.0.0","keywords":["RegExp","clone"],"author":{"name":"Aaron Heckmann","email":"aaron.heckmann+github@gmail.com"},"license":"MIT","_id":"regexp-clone@1.0.0","maintainers":[{"name":"aaron","email":"aaron.heckmann+github@gmail.com"}],"homepage":"https://github.com/aheckmann/regexp-clone#readme","bugs":{"url":"https://github.com/aheckmann/regexp-clone/issues"},"dist":{"shasum":"222db967623277056260b992626354a04ce9bf63","tarball":"https://registry.npmjs.org/regexp-clone/-/regexp-clone-1.0.0.tgz","fileCount":8,"integrity":"sha512-TuAasHQNamyyJ2hb97IuBEif4qBHGjPHBS64sZwytpLEqtBQ1gPJTnOaQ6qmpET16cK14kkjbazl6+p0RRv0yw==","signatures":[{"sig":"MEYCIQDuNmARAarWF+2xAHVL4z8/d6s07RfScdCdEY9I8/8FiQIhAKZuYfpjdxL8el8kyKl2m/raIHs0Ueyuyu3t/g7U4qvz","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":7395,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc+o3YCRA9TVsSAnZWagAA3AIP/2KDC2gc+RGGbFIYd9ry\nyOQOAerddsljWU6KvBf8yhOWMGSf7pq72Mn5Uv8lWBF5WyVH+0ttAJg7EbOJ\nSWhHtjPi6u/whh0z6UkAwSl4iVHBcXgJkJ/b1O5yadYCK/LPpj+UpceOT3m1\n0WhcJ0zzTzJHGgu4K1jY4ifdcsP80evUerAgEPndyiLUFtUEpSPnL9PoMOTp\nnh0vUmLneba5hbQjtYcRa5O1AtYfHrRxS2zKIhlbhJNOEQzcd8bBXZBvNlX4\nInO0pS9VwnPfGc54hEwHdWZCNsc+UA4MDRyRjTS0yWwdSQUoUhQgwP7gzhhc\nA7YtmrULg8luuoQx6suHbqptbEg89+wHnjE+4DyAomzD78uGX/xry2fKEKk6\nTZdNHaQNtWLAW8g/J3Sy4jAIVHtMnUP8xxLoUF0k6+Fi8YHK7LX7CXzS/XiH\nXhI+ia8nY//lsECn0AGzVYToS/QXpl1ibqG90tuuahDsf0TBp+OHULF35bOm\nAn+C8icNsS8quXMLF+TKRGOIj6x3xiiUKOtMPSvTU/plUgip8ZNoVg/sKUvL\n0WTvNK/n9wN9QLL/spbJlerPGasqrObkZnolp3jYn6aR/9SXeVxrwmBBbl84\ngvLCwu1993AUJCLYu0/s6OYlmJUOpPlCgOh+J0HOrvjPrSUSUSf6qS9TiRI6\nJLbh\r\n=hWxH\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","gitHead":"561e4dc5fe5e192a71f5a9c877f7c5b881394d5c","scripts":{"test":"make test"},"_npmUser":{"name":"aaron","email":"aaron.heckmann+github@gmail.com"},"repository":{"url":"git://github.com/aheckmann/regexp-clone.git","type":"git"},"_npmVersion":"6.4.1","description":"Clone RegExps with options","directories":{},"_nodeVersion":"8.11.1","_hasShrinkwrap":false,"devDependencies":{"mocha":"^6.1.4"},"_npmOperationalInternal":{"tmp":"tmp/regexp-clone_1.0.0_1559924183831_0.5688403913827789","host":"s3://npm-registry-packages"}},"1.1.0":{"name":"regexp-clone","version":"1.1.0","keywords":["RegExp","clone"],"author":{"name":"Aaron Heckmann","email":"aaron.heckmann+github@gmail.com"},"license":"MIT","_id":"regexp-clone@1.1.0","maintainers":[{"name":"aaron","email":"aaron.heckmann+github@gmail.com"}],"homepage":"https://github.com/aheckmann/regexp-clone#readme","bugs":{"url":"https://github.com/aheckmann/regexp-clone/issues"},"dist":{"shasum":"9794fa710ca29e28c531e969ff049569caab57ed","tarball":"https://registry.npmjs.org/regexp-clone/-/regexp-clone-1.1.0.tgz","fileCount":7,"integrity":"sha512-M3e0XLDWAL1oO/QN6ugsvSghtXAKGj1OucHI1RaH7B7hgDXnyL7FhHqo5SGtszmb7TU4rGbIdup66GZuDE2HJQ==","signatures":[{"sig":"MEUCIQDqZPATLYxhCQqJWjyMSLGiYlaORhhf8qBzl6SxUwryMwIgbzz6n8A14pSx4HzjYgbM3jVThgdMgLCZ2teOEJoc1MY=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":8727},"main":"index.js","_from":"file:regexp-clone-1.1.0.tgz","scripts":{"test":"node test/index.js"},"_npmUser":{"name":"aaron","email":"aaron.heckmann+github@gmail.com"},"_resolved":"/private/var/folders/m2/1dk_cvb52g9ckkkvqks61h8w0000gn/T/17228d08fbfee8e75ea9e912ab5ccb20/regexp-clone-1.1.0.tgz","_integrity":"sha512-M3e0XLDWAL1oO/QN6ugsvSghtXAKGj1OucHI1RaH7B7hgDXnyL7FhHqo5SGtszmb7TU4rGbIdup66GZuDE2HJQ==","repository":{"url":"git://github.com/aheckmann/regexp-clone.git","type":"git"},"_npmVersion":"10.9.3","description":"Zero dependency RegExp cloning with flag and lastIndex preservation.","directories":{},"_nodeVersion":"22.18.0","_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/regexp-clone_1.1.0_1755045109229_0.3687079840881555","host":"s3://npm-registry-packages-npm-production"}},"1.1.1-1":{"name":"regexp-clone","version":"1.1.1-1","keywords":["RegExp","clone"],"author":{"name":"Aaron Heckmann","email":"aaron.heckmann+github@gmail.com"},"license":"MIT","_id":"regexp-clone@1.1.1-1","maintainers":[{"name":"aaron","email":"aaron.heckmann+github@gmail.com"}],"homepage":"https://github.com/aheckmann/regexp-clone#readme","bugs":{"url":"https://github.com/aheckmann/regexp-clone/issues"},"dist":{"shasum":"776e56de29c456a4d6e96f371e9f6298a040fdd4","tarball":"https://registry.npmjs.org/regexp-clone/-/regexp-clone-1.1.1-1.tgz","fileCount":5,"integrity":"sha512-RHMqaUqV+jSnPiXnRkIp9rOD6/EwB9g+mpro/N/WzfugzjnzSbSUAxhfH1+MqOY2ZCO4XYZEkb91Npigoh+a5A==","signatures":[{"sig":"MEUCIQDBxLKX87LZv7/Gs7BmhUgFnfNKenXbpkcD64BtFeEs1AIgfZvWTpmpnIrRp418lbdyxl9OYbE5DfsP4xfYM+cp4mI=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":6230},"main":"index.js","_from":"file:regexp-clone-1.1.1-1.tgz","types":"index.d.ts","exports":{".":"./index.js","./package.json":"./package.json"},"scripts":{"fix":"pnpm run '/^(format|lint)$/'","lint":"eslint --fix --cache --cache-location .eslintcache .","test":"node test/index.js","build":"tsc","check":"pnpm run '/.*:check$/'","format":"prettier --write --cache --cache-location .prettiercache .","lint:check":"eslint --cache --cache-location .eslintcache .","format:check":"prettier --check --cache --cache-location .prettiercache ."},"_npmUser":{"name":"aaron","email":"aaron.heckmann+github@gmail.com"},"_resolved":"/private/var/folders/m2/1dk_cvb52g9ckkkvqks61h8w0000gn/T/5eef057e4973bfd7e84550f9e25412b3/regexp-clone-1.1.1-1.tgz","_integrity":"sha512-RHMqaUqV+jSnPiXnRkIp9rOD6/EwB9g+mpro/N/WzfugzjnzSbSUAxhfH1+MqOY2ZCO4XYZEkb91Npigoh+a5A==","repository":{"url":"git://github.com/aheckmann/regexp-clone.git","type":"git"},"_npmVersion":"10.9.3","description":"Zero dependency RegExp cloning with flag and lastIndex preservation.","directories":{},"sideEffects":false,"_nodeVersion":"22.18.0","_hasShrinkwrap":false,"devDependencies":{"jiti":"^2.5.1","eslint":"^9.33.0","globals":"^16.3.0","prettier":"3.6.2","@eslint/js":"^9.33.0","typescript":"^5.9.2","@eslint/markdown":"^7.1.0"},"_npmOperationalInternal":{"tmp":"tmp/regexp-clone_1.1.1-1_1755120227025_0.3241767555780277","host":"s3://npm-registry-packages-npm-production"}},"1.2.0":{"name":"regexp-clone","version":"1.2.0","description":"Zero dependency RegExp cloning with flag and lastIndex preservation.","main":"index.js","exports":{".":"./index.js","./package.json":"./package.json"},"types":"index.d.ts","sideEffects":false,"repository":{"type":"git","url":"git://github.com/aheckmann/regexp-clone.git"},"bugs":{"url":"https://github.com/aheckmann/regexp-clone/issues"},"keywords":["RegExp","clone"],"author":{"name":"Aaron Heckmann","email":"aaron.heckmann+github@gmail.com"},"license":"MIT","devDependencies":{"@eslint/js":"^9.33.0","@eslint/markdown":"^7.1.0","eslint":"^9.33.0","globals":"^16.3.0","jiti":"^2.5.1","prettier":"3.6.2","typescript":"^5.9.2"},"scripts":{"test":"node test/index.js","build":"tsc","fix":"pnpm run '/^(format|lint)$/'","check":"pnpm run '/.*:check$/'","format":"prettier --write --cache --cache-location .prettiercache .","format:check":"prettier --check --cache --cache-location .prettiercache .","lint":"eslint --fix --cache --cache-location .eslintcache .","lint:check":"eslint --cache --cache-location .eslintcache ."},"_id":"regexp-clone@1.2.0","homepage":"https://github.com/aheckmann/regexp-clone#readme","_integrity":"sha512-d/LEfc+joiXe4uRyuXMJcOMoqTFKS3pSZUM8WWEqoQ51tZgCdgvu/HLMWaOslhR6igkCdeuc5DULADOK16glMA==","_resolved":"/private/var/folders/m2/1dk_cvb52g9ckkkvqks61h8w0000gn/T/738f3ef652f882e9094d2421aa45f323/regexp-clone-1.2.0.tgz","_from":"file:regexp-clone-1.2.0.tgz","_nodeVersion":"22.18.0","_npmVersion":"10.9.3","dist":{"integrity":"sha512-d/LEfc+joiXe4uRyuXMJcOMoqTFKS3pSZUM8WWEqoQ51tZgCdgvu/HLMWaOslhR6igkCdeuc5DULADOK16glMA==","shasum":"f8d0745833f0d5ae19c0854ed99936555e34fcfc","tarball":"https://registry.npmjs.org/regexp-clone/-/regexp-clone-1.2.0.tgz","fileCount":5,"unpackedSize":6228,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQDS02256gihSPh6F7+QeR4x66gPJZ5CewlTXV1wFNf0BAIhAMoQ6j8fqJHb062NHalMfR78udF2EzGloJ6Gv4SxvIs7"}]},"_npmUser":{"name":"aaron","email":"aaron.heckmann+github@gmail.com"},"directories":{},"maintainers":[{"name":"aaron","email":"aaron.heckmann+github@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/regexp-clone_1.2.0_1755120468881_0.06163376346369276"},"_hasShrinkwrap":false}},"time":{"created":"2013-04-17T21:22:43.991Z","modified":"2025-08-13T21:27:49.309Z","0.0.1":"2013-04-17T21:22:45.036Z","1.0.0":"2019-06-07T16:16:23.962Z","1.1.0":"2025-08-13T00:31:49.453Z","1.1.1-1":"2025-08-13T21:23:47.206Z","1.2.0":"2025-08-13T21:27:49.152Z"},"bugs":{"url":"https://github.com/aheckmann/regexp-clone/issues"},"author":{"name":"Aaron Heckmann","email":"aaron.heckmann+github@gmail.com"},"license":"MIT","homepage":"https://github.com/aheckmann/regexp-clone#readme","keywords":["RegExp","clone"],"repository":{"type":"git","url":"git://github.com/aheckmann/regexp-clone.git"},"description":"Zero dependency RegExp cloning with flag and lastIndex preservation.","maintainers":[{"name":"aaron","email":"aaron.heckmann+github@gmail.com"}],"readme":"# regexp-clone <sup>[![Version Badge][npm-version-svg]][package-url]</sup>\n\n[![License][license-image]][license-url]\n[![Downloads][downloads-image]][downloads-url]\n\n[![npm badge][npm-badge-png]][package-url]\n\nZero dependency JavaScript/TypeScript `RegExp` cloner with flag and `lastIndex` preservation.\n\n## Usage\n\n```js\nconst clone = require('regexp-clone');\n\nconst a = /somethin/dgimsuy;\nconsole.log(a.global); // true\nconsole.log(a.ignoreCase); // true\nconsole.log(a.multiline); // true\nconsole.log(a.dotAll); // true\nconsole.log(a.unicode); // true\nconsole.log(a.sticky); // true\nconsole.log(a.hasIndices); // true\n\nconst b = clone(a);\nconsole.log(b.global); // true\nconsole.log(b.ignoreCase); // true\nconsole.log(b.multiline); // true\nconsole.log(b.dotAll); // true\nconsole.log(b.unicode); // true\nconsole.log(b.sticky); // true\nconsole.log(b.hasIndices); // true\n\nconst c = /hi/g;\nc.test('this string hi there');\nassert.strictEqual(c.lastIndex, 3);\n\nconst d = clone(c);\nassert.strictEqual(d.lastIndex, 3);\nd.test('this string hi there');\nassert.strictEqual(d.lastIndex, 14);\nassert.strictEqual(c.lastIndex, 3);\n```\n\n## Installation\n\n```bash\npnpm add regexp-clone\n```\n\n## Testing\n\n```bash\npnpm test\n```\n\n## License\n\n[MIT][license-url]\n\n[package-url]: https://npmjs.org/package/regexp-clone\n[npm-version-svg]: https://versionbadg.es/aheckmann/regexp-clone.svg\n[npm-badge-png]: https://nodei.co/npm/regexp-clone.png?downloads=true&stars=true\n[license-image]: https://img.shields.io/npm/l/regexp-clone.svg\n[license-url]: https://github.com/aheckmann/regexp-clone/blob/main/LICENSE\n[downloads-image]: https://img.shields.io/npm/dm/regexp-clone.svg\n[downloads-url]: https://npm-stat.com/charts.html?package=regexp-clone\n","readmeFilename":"README.md"}