{"name":"runes2","version":"1.0.7","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"},"license":"MIT","author":{"name":"Vitaly Domnikov","email":"dotcypress@gmail.com"},"sideEffects":false,"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.esm.mjs","require":"./dist/index.cjs"},"./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":{"pretest":"echo pretest","test":"jest","test:jest":"jest --passWithNoTests","test:jest:clearCache":"jest --clearCache","test:jest:snapshot":"yarn run test:jest -- -u","test:snapshot":"yarn run test -- -u","posttest":"yarn run build","install:frozenLockfile":"yarn-tool install --frozen-lockfile","install:resetLockfile":"yarn-tool install --reset-lockfile","build":"yarn run build:tsdx && yarn run build:dts:bundle","build:dts:bundle":"ynpx 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":"yarn run build:dts:tsc:emit && yarn run build:dts:copy","build:dts:tsc:emit":"tsc --emitDeclarationOnly --declaration --noEmit false","build:tsdx":"ynpx @bluelovers/tsdx build --target node","ci:install":"yarn install --frozen-lockfile && yarn 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":"yarn run version:bump && npm publish","preversion":"echo preversion && yarn run test","version":"echo version","version:bump":"yarn-tool version","postversion":"echo postversion","prepublish":"echo prepublish","prepare":"echo prepare","prepublishOnly":"yarn run preversion","prepublishOnly:check-bin":"ynpx --quiet @yarn-tool/check-pkg-bin","prepublishOnly:update":"yarn run ncu && yarn run sort-package-json","prepack":"echo prepack","pack":"echo pack","postpack":"echo postpack","publish":"echo publish","postpublish":"yarn 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":"npx yarn-tool root run postpublishOnly:add runes2","ncu":"yarn-tool ncu -u","sort-package-json":"yarn-tool sort","tsc:showConfig":"ynpx get-current-tsconfig -p"},"devDependencies":{"@bluelovers/tsconfig":"^1.0.30","@types/jest":"^28.1.8","@types/node":"^18.7.13","tslib":"^2"},"packageManager":"yarn@1.22.19","gitHead":"08d33a99aaaaf50c8eff6667b0f6129e6d917c3f","_id":"runes2@1.0.7","_nodeVersion":"18.7.0","_npmVersion":"lerna/5.4.3/node@v18.7.0+x64 (win32)","dist":{"integrity":"sha512-C4UEjkHkLQ0p7lBSWgh7u/NscclKsxcRPx7uKxnQsGNL0N+/+OToLScTJVURaHOureuq6Xo7L6sxajNf8YKYWA==","shasum":"2af37172938ec44e8a4d4c9de8682c92afc39ad4","tarball":"http://registry-npm.ywwl.com/runes2/download/runes2-1.0.7.tgz","fileCount":17,"unpackedSize":87953,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCui1ymiQcU9vBWQVeeCzJSLq2Cgj18F+r3MNZOB93EPgIgEXVyjDtT+7huNwpga+E/BZehs9i4jeBUCX6hPcbPt7A="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjCo6GACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrjIxAAjdtgZwowjw1OGD0CTaRf9lcjFhCN3xacQty8IHKvIjAHiGYg\r\nTIOudJnqPWrFrusySaOXFi1T9tZK1oWWrC3pJx9w5GXzaDpFg/nH0mhZI1Pm\r\nM27Z6TIW45q9NP91oXLPz9oLy799y+fASYQiTaY99BKs5PhZ4wfV+BWijhuT\r\nU2VBIJYkuvnTR7oQFuEliUbwDFnvwmHz/fuCmqjN2ncEmFSiIpL4wq4zPr0j\r\nmnZi0SaxNVxFb0jm7a1I7AoMzeSogdiIkBn4STJFiit8cvjnpNvdEUNF1BRc\r\nCHCN9vj4tDhsKBfDgt9kcG1gab64cyvJZDLtNotp1sJk0w75sjl+L8BHjH//\r\noj5jNuw9WfMFH0DWF9dzR/Cth4yt65XodeVbju5ZMFfcAVkYqBDABvfO+jYh\r\nnpDdTie3sPTrSgRu6gLHaSnOptQgbVg/iUK49T5WUluR8IMcPuRjfgy008T+\r\nYZmX/VpVh4IYzFNXpXvIaRza4o/Dg4GOLwYUVjSUjJ68IPJlgRylpWJFNvlI\r\nk8X3Ua11sur8CB21QYreoSrxnTp+zc/lsQ0THrY9PY2FTYoMkvM+udAEdHP2\r\nsPx7smgXe+tOGpvrGW46jWLGTuSUtdvNFQ9q6xUhm3PZ5TobpFD1FSBNCdHL\r\nLYK62WwDefjeDmqwhCK4OGRrqp9z7Wa01FA=\r\n=uiXz\r\n-----END PGP SIGNATURE-----\r\n","size":16744,"noattachment":false,"key":"/runes2/-/runes2-1.0.7.tgz"},"_npmUser":{"name":"bluelovers","email":"codelovers@users.sourceforge.net"},"maintainers":[{"name":"bluelovers","email":"codelovers@users.sourceforge.net"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/runes2_1.0.7_1661636230490_0.6834205241488851"},"_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```js\n$ npm 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":1661636230617,"_cnpm_publish_time":1661636230617,"dist-tags":{"latest":"1.1.10"}}