{"name":"runes2","version":"1.1.10","description":"Unicode-aware JS string splitting, typescript version","keywords":["char","emoji","runes","split","split string","string","unicode","create-by-yarn-tool","create-by-tsdx"],"homepage":"https://github.com/bluelovers/ws-string/tree/master/packages/runes2#readme","bugs":{"url":"https://github.com/bluelovers/ws-string/issues"},"repository":{"type":"git","url":"git+https://github.com/bluelovers/ws-string.git","directory":"packages/runes2"},"license":"MIT","author":{"name":"Vitaly Domnikov","email":"dotcypress@gmail.com"},"sideEffects":false,"exports":{".":{"types":"./dist/index.d.ts","require":"./dist/index.cjs","import":"./dist/index.esm.mjs"},"./package.json":"./package.json","./src/*":"./src/*"},"main":"dist/index.cjs","unpkg":"dist/index.umd.production.min.cjs","module":"dist/index.esm.mjs","types":"dist/index.d.ts","typings":"dist/index.d.ts","directories":{"test":"test"},"scripts":{"coverage":"pnpm run test --coverage","test":"jest","test:jest":"jest --passWithNoTests","test:jest:clearCache":"jest --clearCache","test:jest:coverage":"node --run test:jest -- --coverage","test:jest:snapshot":"node --run test:jest -- -u","test:snapshot":"pnpm run test -u","test:tsd":"ynpx tsd","posttest":"pnpm run build","install:frozenLockfile":"yarn-tool install --frozen-lockfile","install:resetLockfile":"yarn-tool install --reset-lockfile","build":"pnpm run build:tsdx && pnpm run build:dts:bundle","build:dts:bundle":"ynpx @bluelovers/dts-bundle-generator -o ./dist/index.d.ts src/index.ts --no-banner --inline-declare-global & echo build:dts:bundle","build:dts:copy":"copy .\\src\\index.d.ts .\\dist\\index.d.ts & echo build:dts","build:dts:tsc":"pnpm run build:dts:tsc:emit && pnpm run build:dts:copy","build:dts:tsc:emit":"tsc --emitDeclarationOnly --declaration --noEmit false","build:tsdx":"ynpx @bluelovers/tsdx build --target node","ci:install":"pnpm install --frozen-lockfile && pnpm add -w typescript@next jest ts-jest ts-node ynpx lerna yarn-tool","ci:build":"echo ci:build","npm:publish":"npm publish","npm:publish:bump":"pnpm run version:bump && npm publish","preversion":"echo preversion && pnpm run test","version":"echo version","version:bump":"yarn-tool version","prepublishOnly":"pnpm run preversion","prepublishOnly:check-bin":"ynpx --quiet @yarn-tool/check-pkg-bin","prepublishOnly:update":"pnpm run ncu && pnpm run sort-package-json","publish":"echo publish","postpublish":"pnpm run postpublishOnly:add","postpublish:changelog":"ynpx --quiet @yarn-tool/changelog && git add ./CHANGELOG.md","postpublish:git:commit":"git commit -m \"chore(release): publish\" . & echo postpublish:git:commit","postpublish:git:push":"git push --follow-tags","postpublish:git:tag":"ynpx --quiet @yarn-tool/tag","postpublishOnly":"echo postpublishOnly","postpublishOnly:add":"pnpm -w run postpublishOnly:add runes2","ncu":"yarn-tool ncu -u","sort-package-json":"yarn-tool sort","tsc:showConfig":"ynpx get-current-tsconfig -p"},"gitHead":"6ffa4a4051d86d053fbecd9b43185ddc18307923","_id":"runes2@1.1.10","_nodeVersion":"26.7.0","_npmVersion":"lerna/7.4.2/node@v26.7.0+x64 (win32)","dist":{"integrity":"sha512-4Y1en7X+3i0pf9NDPMEerT1CkZlExpQJPnEPlrBXzXSIHO3etyZR6Wbpl+hHWVYRFnhPVCyPHaJks6GcCFgEiA==","shasum":"0cdb37260a71212d882884b12af3afa39c77793f","tarball":"http://registry-npm.ywwl.com/runes2/download/runes2-1.1.10.tgz","fileCount":18,"unpackedSize":123070,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQDlFlKiR8HtbdHgdVRJSW0MIEouFCY0RfBhp8VCtPLt3AIhALLgiS6GUNdT5aEJHZPoNnMmgSb9pTqsGdnuNH+T+TQH"}],"size":21873,"noattachment":false,"key":"/runes2/-/runes2-1.1.10.tgz"},"_npmUser":{"name":"bluelovers","email":"codelovers@users.sourceforge.net"},"maintainers":[{"name":"bluelovers","email":"codelovers@users.sourceforge.net"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/runes2_1.1.10_1789170432902_0.17224100767645512"},"_hasShrinkwrap":false,"readme":"# ✂️ Runes\n\n> Unicode-aware JS string splitting with full Emoji support.\n\nSplit a string into its constituent characters, without munging emoji and other non-BMP code points.\n\n**this is typescript version fork form [`runes`](https://www.npmjs.com/package/runes)**\n\n## Why?\n\nThe native `String#split` implementation does not pay attention to [surrogate pairs](http://en.wikipedia.org/wiki/UTF-16). When the code units of a surrogate pair are split apart, they are not intelligible on their own. Unless they are put back together in the correct order, individual code units will cause problems in code that handles strings.\n\n## 安裝 (Installation)\n\n```bash\n# 使用 yarn / Using yarn\nyarn add runes2\n\n# 使用 yarn-tool / Using yarn-tool\nyarn-tool add runes2\n# yt 是 yarn-tool 的別名 / yt is an alias for yarn-tool\nyt add runes2\n\n# 使用 pnpm / Using pnpm\npnpm add runes2\n\n# 使用 npm / Using npm\nnpm install runes2\n```\n\n## Example\n\n```ts\nconst runes = require('runes2').default\nconst runes = require('runes2').runes\nimport runes from 'runes2';\nimport { runes } from 'runes2';\n```\n\n```js\n// Standard String.split\n'♥️'.split('') // => ['♥', '️']\n'Emoji 🤖'.split('') // => ['E', 'm', 'o', 'j', 'i', ' ', '�', '�']\n'👩‍👩‍👧‍👦'.split('') // => ['�', '�', '‍', '�', '�', '‍', '�', '�', '‍', '�', '�']\n\n// ES6 string iterator\n\t[\n...\n'♥️'\n] =>\n['♥', '️']\n\t[\n...\n'Emoji 🤖'\n] // => [ 'E', 'm', 'o', 'j', 'i', ' ', '🤖' ]\n[...'👩‍👩‍👧‍👦'] // => [ '👩', '', '👩', '', '👧', '', '👦' ]\n\n// Runes\nrunes('♥️') // => ['♥️']\nrunes('Emoji 🤖') // => ['E', 'm', 'o', 'j', 'i', ' ', '🤖']\nrunes('👩‍👩‍👧‍👦') // => ['👩‍👩‍👧‍👦']\n\n```\n\n## Substring example\n\n```js\n// String.substring\n'👨‍👨‍👧‍👧a'.substring(1) // => '�‍👨‍👧‍👧a'\n\n// Runes\nrunes.substr('👨‍👨‍👧‍👧a', 1) // => 'a'\n```\n","publish_time":1789170433034,"_cnpm_publish_time":1789170433034,"dist-tags":{"latest":"1.1.10"}}