{"id":26502859,"url":"https://github.com/grassator/utf8string","last_synced_at":"2026-05-21T14:05:38.830Z","repository":{"id":57388995,"uuid":"53960841","full_name":"grassator/utf8string","owner":"grassator","description":"An implementation of Utf8 based string in JavaScript","archived":false,"fork":false,"pushed_at":"2016-03-15T16:35:11.000Z","size":18,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-04-08T09:22:39.263Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/grassator.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-03-15T16:30:30.000Z","updated_at":"2019-05-31T07:23:32.000Z","dependencies_parsed_at":"2022-09-26T19:02:34.633Z","dependency_job_id":null,"html_url":"https://github.com/grassator/utf8string","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/grassator/utf8string","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/grassator%2Futf8string","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/grassator%2Futf8string/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/grassator%2Futf8string/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/grassator%2Futf8string/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/grassator","download_url":"https://codeload.github.com/grassator/utf8string/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/grassator%2Futf8string/sbom","scorecard":{"id":443966,"data":{"date":"2025-08-11","repo":{"name":"github.com/grassator/utf8string","commit":"e6d4bdcf05bbe8e637e422c90a44cff42ea4ca84"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3,"checks":[{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Code-Review","score":0,"reason":"Found 0/15 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}}]},"last_synced_at":"2025-08-19T06:14:25.920Z","repository_id":57388995,"created_at":"2025-08-19T06:14:25.920Z","updated_at":"2025-08-19T06:14:25.920Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33303158,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-21T12:23:38.849Z","status":"ssl_error","status_checked_at":"2026-05-21T12:22:11.673Z","response_time":62,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-03-20T18:35:59.676Z","updated_at":"2026-05-21T14:05:38.813Z","avatar_url":"https://github.com/grassator.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Utf8String\n\n[![NPM version](https://badge.fury.io/js/utf8string.svg)](https://npmjs.org/package/utf8string)\n[![Build Status][travis-image]][travis-url]\n\n[project-url]: https://github.com/grassator/utf8string\n[travis-url]: https://travis-ci.org/grassator/utf8string\n[travis-image]: https://travis-ci.org/grassator/utf8string.svg?branch=master\n\nWhile this string implementation has all the necessary bits to sometime grow into\na full-fledged implementation, this is unlikely to happen firstly because of\ntime needed, but also because such an implementation require a custom regular\nexpression engine.\n\n## Simple Example\n\n```js\nconst str = new Utf8String('aaaabc');\nconst searchStr = new Utf8String('aab');\nconst result = str.substring(str.find(searchStr));\nconsole.log(String(result)); // \"aabc\"\n```\n\nFor more examples please refer to the tests.\n\n## Immutability\n\nAll string operation return a new `Utf8String` object.\n\n\n## Iterating a string\n\nBecause of the nature of UTF-8 encoding (and Unicode in general),\na JavaScript's String style random access to a string is not very\ndesirable for performance reasons since you have to always iterate\nfrom the start of the string and count the code points.\n\nMoreover code points may not be what you want to count, as, for\nexample grapheme clusters should be used for counting what would\none visually consider \"characters\".\n\nThis is why `Utf8String` exposes a `codePoints()` method that\nreturns an iterator over unicode code points, which is also\naliased to an `[Symbol.iterator]()` method so that it is easy\nto use `Utf8String` in `for .. of` constructs and with other\nfunctions and constructs that expect an object conforming to an\niterator protocol such as `Array.from()` or spread operator.\n\n`Utf8String` also provides a `bytes()` iterator that could\nbe used for low-level access to the string.\n\n## Size of a string\n\nThe same as with iteration, depending on your particular requirements\nyou might have a different definition of a size (or a length) of a\nstring. This is why instead of providing a multitude of instance\nmethods `Utf8String` library takes a different approach with\ndelivering a single class utility method called `Utf8String.count()`,\nwhich accepts and iterable, such as one returned by `codePoints()`\nor `bytes()` instance method.\n\nThis approach also allows to provide additional iterators such as\ncharacters (grapheme clusters), or even words as separate packages\nwhile making use of default length / counting facilities.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgrassator%2Futf8string","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgrassator%2Futf8string","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgrassator%2Futf8string/lists"}