{"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":"http://registry-npm.ywwl.com/regexp-clone/download/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,"size":2544,"noattachment":false,"key":"/regexp-clone/-/regexp-clone-1.1.1-1.tgz"},"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"},"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","publish_time":1755120227206,"_cnpm_publish_time":1755120227206,"dist-tags":{"latest":"1.2.0"}}