{"name":"runes2","version":"1.1.9","keywords":["char","emoji","runes","split","split string","string","unicode","create-by-yarn-tool","create-by-tsdx"],"author":{"name":"Vitaly Domnikov","email":"dotcypress@gmail.com"},"license":"MIT","_id":"runes2@1.1.9","maintainers":[{"name":"bluelovers","email":"codelovers@users.sourceforge.net"}],"homepage":"https://github.com/bluelovers/ws-string/tree/master/packages/runes2#readme","bugs":{"url":"https://github.com/bluelovers/ws-string/issues"},"dist":{"shasum":"3759290a0d2d93b5c8ffc266abe498ca4181b1ad","tarball":"http://registry-npm.ywwl.com/runes2/download/runes2-1.1.9.tgz","fileCount":18,"integrity":"sha512-PklH8YC1KbXYVSK4KiGVgbNtKah2QKVLEL2iWBZPUWUw3JcukT1jjPjAqtMnmVrMre6tJ2ADexgvZL7ZfQwpQQ==","signatures":[{"sig":"MEUCIB35PrkniZ8eRPauxlSTIPjmfu4ogG9yWr/eaZNt4+x0AiEA7jYjWmYFNsnwncyRgXB/RX3LCdF/DHaQRxxH78g5q5g=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":122512,"size":21652,"noattachment":false,"key":"/runes2/-/runes2-1.1.9.tgz"},"main":"dist/index.cjs","types":"dist/index.d.ts","unpkg":"dist/index.umd.production.min.cjs","module":"dist/index.esm.mjs","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.esm.mjs","require":"./dist/index.cjs"},"./src/*":"./src/*","./package.json":"./package.json"},"gitHead":"b634d74553cfa1347284799c1df644eb8e0c2f1d","scripts":{"ncu":"yarn-tool ncu -u","test":"jest","build":"pnpm run build:tsdx && pnpm run build:dts:bundle","publish":"echo publish","version":"echo version","ci:build":"echo ci:build","coverage":"pnpm run test --coverage","posttest":"pnpm run build","test:tsd":"ynpx tsd","test:jest":"jest --passWithNoTests","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","preversion":"echo preversion && pnpm run test","npm:publish":"npm publish","postpublish":"pnpm run postpublishOnly:add","version:bump":"yarn-tool version","build:dts:tsc":"pnpm run build:dts:tsc:emit && pnpm run build:dts:copy","test:snapshot":"pnpm run test -u","build:dts:copy":"copy .\\src\\index.d.ts .\\dist\\index.d.ts & echo build:dts","prepublishOnly":"pnpm run preversion","tsc:showConfig":"ynpx get-current-tsconfig -p","postpublishOnly":"echo postpublishOnly","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","npm:publish:bump":"pnpm run version:bump && npm publish","sort-package-json":"yarn-tool sort","build:dts:tsc:emit":"tsc --emitDeclarationOnly --declaration --noEmit false","test:jest:coverage":"node --run test:jest -- --coverage","test:jest:snapshot":"node --run test:jest -- -u","postpublish:git:tag":"ynpx --quiet @yarn-tool/tag","postpublishOnly:add":"pnpm -w run postpublishOnly:add runes2","postpublish:git:push":"git push --follow-tags","test:jest:clearCache":"jest --clearCache","install:resetLockfile":"yarn-tool install --reset-lockfile","postpublish:changelog":"ynpx --quiet @yarn-tool/changelog && git add ./CHANGELOG.md","prepublishOnly:update":"pnpm run ncu && pnpm run sort-package-json","install:frozenLockfile":"yarn-tool install --frozen-lockfile","postpublish:git:commit":"git commit -m \"chore(release): publish\" . & echo postpublish:git:commit","prepublishOnly:check-bin":"ynpx --quiet @yarn-tool/check-pkg-bin"},"typings":"dist/index.d.ts","_npmUser":{"name":"bluelovers","email":"codelovers@users.sourceforge.net"},"repository":{"url":"git+https://github.com/bluelovers/ws-string.git","type":"git","directory":"packages/runes2"},"_npmVersion":"lerna/7.4.2/node@v26.7.0+x64 (win32)","description":"Unicode-aware JS string splitting, typescript version","directories":{"test":"test"},"sideEffects":false,"_nodeVersion":"26.7.0","_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/runes2_1.1.9_1789166906296_0.21513668509678285","host":"s3://npm-registry-packages-npm-production"},"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":1789166906424,"_cnpm_publish_time":1789166906424,"dist-tags":{"latest":"1.1.10"}}