{"name":"@marijn/find-cluster-break","version":"1.0.3","keywords":["unicode","grapheme","cluster","break"],"author":{"name":"Marijn Haverbeke","email":"marijn@haverbeke.berlin"},"license":"MIT","_id":"@marijn/find-cluster-break@1.0.3","maintainers":[{"name":"marijn","email":"marijn@haverbeke.berlin"}],"homepage":"https://code.haverbeke.berlin/marijn/find-cluster-break","bugs":{"url":"https://code.haverbeke.berlin/marijn/find-cluster-break/issues"},"dist":{"shasum":"bdbe907e00c17c84e33fc51b1519d9aa211e7e8e","tarball":"http://registry-npm.ywwl.com/@marijn/find-cluster-break/download/@marijn/find-cluster-break-1.0.3.tgz","fileCount":9,"integrity":"sha512-FY+MKLBoTsLNJF/eLWaOsXGdz6uh3Iu1axjPf6TUq92IYumcTcXWHoS747JARLkcdlJ/Waiaxc5wQfFO8jC6NA==","signatures":[{"sig":"MEYCIQCSbjeto0rnTSiQ9A1WM9Pdt4VEdOiow4KCl3anUf5n9QIhAOQoLOp5EEpEGQbb8jxoOemcQsTsgnP90GusZh6eXjkN","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":13574,"size":4242,"noattachment":false,"key":"/@marijn/find-cluster-break/-/@marijn/find-cluster-break-1.0.3.tgz"},"main":"src/index.js","type":"module","types":"./src/index.d.ts","exports":{"import":"./src/index.js","require":"./dist/index.cjs"},"gitHead":"2daa8b92bca5115dccf68bc03625f8a268e38b21","scripts":{"test":"mocha test/*.js","prepare":"rollup -c"},"_npmUser":{"name":"marijn","email":"marijn@haverbeke.berlin"},"repository":{"url":"git+https://code.haverbeke.berlin/marijn/find-cluster-break.git","type":"git"},"_npmVersion":"11.9.0","description":"Find the position of grapheme cluster breaks in a string","directories":{},"_nodeVersion":"22.20.0","_hasShrinkwrap":false,"devDependencies":{"mocha":"^10.7.3","rollup":"^4.28.1"},"_npmOperationalInternal":{"tmp":"tmp/find-cluster-break_1.0.3_1782556700046_0.6179388401365882","host":"s3://npm-registry-packages-npm-production"},"readme":"# @marijn/find-cluster-break\n\nSmall JavaScript module for finding grapheme cluster breaks in\nstrings, scanning from a given position.\n\n```javascript\nimport {findClusterBreak} from \"@marijn/find-cluster-break\"\nconsole.log(findClusterBreak(\"💪🏽🦋\", 0))\n// → 4\n```\n\nThis code is open source, released under an MIT license.\n    \n## Documentation\n\n**`findClusterBreak`**`(str: string, pos: number, forward = true, includeExtending = true): number`\n\nReturns a next grapheme cluster break _after_ (not equal to) `pos`,\nif `forward` is true, or before otherwise. Returns `pos` itself if no\nfurther cluster break is available in the string. Moves across\nsurrogate pairs, extending characters (when `includeExtending` is\ntrue, which is the default), characters joined with zero-width joiners,\nand flag emoji.\n\n**`isExtendingChar`**`(code: number): boolean`\n\nQuery whether the given character has a `Grapheme_Cluster_Break` value\nof `Extend` in Unicode.\n","publish_time":1782556700193,"_cnpm_publish_time":1782556700193,"dist-tags":{"latest":"1.0.4"}}