{"name":"runes2","version":"0.4.16","description":"Unicode-aware JS string splitting, typescript version","keywords":["char","emoji","runes","split","split string","string","unicode"],"homepage":"https://github.com/bluelovers/runes#readme","bugs":{"url":"https://github.com/bluelovers/runes/issues"},"repository":{"type":"git","url":"git+https://github.com/bluelovers/runes.git"},"license":"MIT","author":{"name":"Vitaly Domnikov","email":"dotcypress@gmail.com"},"main":"index.js","directories":{"test":"test"},"scripts":{"test":"jest","npm:publish":"npm publish","npm:publish:lerna":"npx lerna publish --yes --cd-version patch","prepublish:lockfile":"npx sync-lockfile .","prepublishOnly":"yarn run test","postpublish":"yarn run postpublishOnly:add","postpublish_":"git commit -m \"chore(release): publish\" .","ncu":"npx yarn-tool ncu -u","postpublishOnly:add":"npx yarn-tool root run postpublishOnly:add runes2","sort-package-json":"npx yarn-tool sort"},"gitHead":"3da406ac9aa41fc9073385d8ffa834b2e56ad38a","dependencies":{"tslib":"^2.3.1"},"_id":"runes2@0.4.16","_nodeVersion":"17.3.0","_npmVersion":"lerna/4.0.0/node@v17.3.0+x64 (win32)","dist":{"integrity":"sha512-x7Yn5ZPXWXSNyQFIjljsKmYg4ef9/vblZQwrF8nSJdX10hX1Rd0B9InRI2YCiSf65nVXY3AfP/TpBQNI+NojHA==","shasum":"d780efad78b8253116a7cc4d8ecb97f5556aac0c","tarball":"http://registry-npm.ywwl.com/runes2/download/runes2-0.4.16.tgz","fileCount":10,"unpackedSize":25114,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh5eE5CRA9TVsSAnZWagAAWsUP/RxrlHQMlnoQbkiliBqb\n/1IbuLm2P65V0Q13cw8yLgEVLZ1vAp53EZvl0udGj4vOeYXJGzXaT4/h8LSC\nEap84QUm/+L7FI5BCxdWs146UBi6Q71J7zxj65MZe60Nn/DsGq/uZMa6exma\nQWYWaBtUn5KgYu+aFY+/Nev11YC0sanMJqjNS+1TZ3cGUZnr1D0OPy3vRZlf\nopduS5W34KwBWb5NfBvnv5feobRj9vZfegzw0uwpdanQbLfyY/ZD1lv32mDT\nvImMucqJxlraxL96bMfg5cc6vXvYEqhJhvy7Gn3g/FSO7JgvQGeTflmvz2ca\nANQWnIPHeCRVxV/E2tyKHC3OF+KunOzE9YmEFqYH3CTiVO/g6JvqbUuRPCFn\nW4hhKByeVo6Y8iuDH8FY/GNSLvcBosxM6eR9cBLw3SBKmTYulDdAq0DYe4bR\nEr2eyLexKnnyIEprHQfOy3gKnmYzfWahKRR4rAoheQAYsPBZ0k22+9FY8Fcm\nBDIYcnNpDkPrKx6FJmPaSSNZYWU7grcWIHUSZtLckBuD51sar1GSppXBrkBC\nRqZ2d4yxtNHP275IG/0lBn+CBnLB8kCwKUohV6b+5qGSbsaOlL7SVBlytNfp\n5RjWwmdCEbXA7LHNzCAqzQVabtmqnVb1QKvEzA5L0Du6otfE+EoW7varwR+s\nzhD3\r\n=S8Ey\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEWFLzbnHUZ8Kvx0HEkR4VNs8dogVpC/biqUwMIA26EMAiEAtqUlUSuUY5DyLx3emp7TtFhloFTaaJ6KI9759iRkeDA="}],"size":7140,"noattachment":false,"key":"/runes2/-/runes2-0.4.16.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_0.4.16_1642455353290_0.07661841754118637"},"_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":1642455353433,"_cnpm_publish_time":1642455353433,"dist-tags":{"latest":"1.1.10"}}