{"name":"@marijn/find-cluster-break","version":"1.0.2","type":"module","description":"Find the position of grapheme cluster breaks in a string","main":"src/index.js","exports":{"import":"./src/index.js","require":"./dist/index.cjs"},"scripts":{"test":"mocha test/*.js","prepare":"rollup -c"},"repository":{"type":"git","url":"git+https://github.com/marijnh/find-cluster-break.git"},"keywords":["unicode","grapheme","cluster","break"],"author":{"name":"Marijn Haverbeke","email":"marijn@haverbeke.berlin"},"license":"MIT","bugs":{"url":"https://github.com/marijnh/find-cluster-break/issues"},"homepage":"https://github.com/marijnh/find-cluster-break#readme","devDependencies":{"mocha":"^10.7.3","rollup":"^4.28.1"},"_id":"@marijn/find-cluster-break@1.0.2","gitHead":"b0b1f10aa0c131cf53f2dc347a09544b4ae87324","types":"./src/index.d.ts","_nodeVersion":"20.13.1","_npmVersion":"10.9.0","dist":{"integrity":"sha512-l0h88YhZFyKdXIFNfSWpyjStDjGHwZ/U7iobcK1cQQD8sejsONdQtTVU+1wVN1PBw40PiiHB1vA5S7VTfQiP9g==","shasum":"775374306116d51c0c500b8c4face0f9a04752d8","tarball":"http://registry-npm.ywwl.com/@marijn/find-cluster-break/download/@marijn/find-cluster-break-1.0.2.tgz","fileCount":9,"unpackedSize":13551,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBgLo6/lgUzByto+Y3oUY6rF2+psOJMqYgX5PyYFrXGOAiBMoDZLD1mzgACWqkmUCk0sSkbc7taICqWMEYgsw6rs5A=="}],"size":4254,"noattachment":false,"key":"/@marijn/find-cluster-break/-/@marijn/find-cluster-break-1.0.2.tgz"},"_npmUser":{"name":"marijn","email":"marijn@haverbeke.berlin"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/find-cluster-break_1.0.2_1733760931639_0.31506004428107537"},"_hasShrinkwrap":false,"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":1733760931824,"maintainers":[{"name":"marijn","email":"marijn@haverbeke.berlin"}],"_cnpm_publish_time":1733760931824,"dist-tags":{"latest":"1.0.4"}}