{"name":"@marijn/find-cluster-break","version":"1.0.0","keywords":["unicode","grapheme","cluster","break"],"author":{"name":"Marijn Haverbeke","email":"marijn@haverbeke.berlin"},"license":"MIT","_id":"@marijn/find-cluster-break@1.0.0","maintainers":[{"name":"marijn","email":"marijn@haverbeke.berlin"}],"homepage":"https://github.com/marijnh/find-cluster-break#readme","bugs":{"url":"https://github.com/marijnh/find-cluster-break/issues"},"dist":{"shasum":"614d98092dd8d1203faa4be22a9912b711f6b972","tarball":"http://registry-npm.ywwl.com/@marijn/find-cluster-break/download/@marijn/find-cluster-break-1.0.0.tgz","fileCount":5,"integrity":"sha512-0YSzy7M9mBiK+h1m33rD8vZOfaO8leG6CY3+Q+1Lig86snkc8OAHQVAdndmnXMWJlVIH6S7fSZVVcjLcq6OH1A==","signatures":[{"sig":"MEQCICMtskQrJhRz8H9NHwUreOkf7koWYAc6Zel9noTCSIWxAiBPeak/XI8glyNnkYKySDTnVf0R4RDB4WbaoxKzJMN8aQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":7322,"size":3216,"noattachment":false,"key":"/@marijn/find-cluster-break/-/@marijn/find-cluster-break-1.0.0.tgz"},"main":"src/index.js","type":"module","types":"./src/index.d.ts","gitHead":"233293cd657c254a20c677ece51e55dd7f9923e3","scripts":{"test":"mocha test/*.js"},"_npmUser":{"name":"marijn","email":"marijn@haverbeke.berlin"},"repository":{"url":"git+https://github.com/marijnh/find-cluster-break.git","type":"git"},"_npmVersion":"10.8.0","description":"Find the position of grapheme cluster breaks in a string","directories":{},"_nodeVersion":"20.13.1","_hasShrinkwrap":false,"devDependencies":{"mocha":"^10.7.3"},"_npmOperationalInternal":{"tmp":"tmp/find-cluster-break_1.0.0_1728240260812_0.04868973051601633","host":"s3://npm-registry-packages"},"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":1728240261031,"_cnpm_publish_time":1728240261031,"dist-tags":{"latest":"1.0.4"}}