ccount is a tiny JavaScript (ESM only) utility that counts how many times a substring occurs within a string. It exports a single function, ccount(value, substring), which returns the match count and is useful for small string analysis tasks like choosing quote styles when generating code. It works in Node.js (14.14+ and 16.0+), Deno, and modern browsers.
Project status
- Maintenance status: The repo shows a recent upstream push on 2022-11-20, but the latest summarized update is 2.0.1 (2021-10-28), suggesting ongoing maintenance but with limited user-facing updates lately.
- Update cadence: Updates are infrequent after the major change, with 2.0.0 (2021-03-09) followed by 2.0.1 (2021-10-28), and then no additional summarized updates before the last recorded push in late 2022.
AI summary generated Today
Recent updates
2.0.1
10/28/2021Release 2.0.1 is described as a documentation update plus a move toward stricter typing. The code diff mostly affects tooling and docs, but there is at least one runtime behavior change in the error type thrown for invalid inputs.
2.0.0
3/9/2021Version 2.0.0 converts the library from CommonJS to ESM and adds JSDoc-based type definitions. The runtime logic of `ccount` is largely unchanged, but the module format and published entry points change substantially.
BreakingFeatures1.1.0
10/28/2020Release 1.1.0 claims to add support for astral characters (such as emoji) when counting occurrences. The code changes also adjust how the next search offset is calculated and relax the input validation for the `character` argument.
Features1.0.5
1/26/2020Release 1.0.5 is described in the release notes as a prose refactor. However, the actual diff includes a small runtime implementation tweak in index.js, documentation formatting changes in readme.md, added funding metadata, and multiple devDependency version bumps in package.json.
1.0.4
5/8/2019Release 1.0.4 mainly updates presentation and metadata: it adds additional badges, switches various displayed links from HTTP to HTTPS, and renames LICENSE to license. However, the code diff also shows several build and CI configuration changes in package.json that are not described in the release notes.
Features1.0.3
4/18/2018Release 1.0.3 is described as a code-style refactor, and the runtime implementation (ccount in index.js) appears to remain functionally the same. However, the diff also updates the project tooling and CI/test behavior (formatting in test runs, stricter coverage gating, dependency and build script changes) that are not mentioned in the release notes.
Breaking1.0.2
7/12/2017Release 1.0.2 primarily refactors documentation by updating readme.md and removing history.md, and it removes the bundled distribution files from the repository. The runtime module code (index.js) still exports the same ccount function with the same signature and behavior.
1.0.0
7/23/2016Release 1.0.0 was published on 2016-07-23. The provided release notes contain no documented changes, so there is no actionable information to assess API compatibility, behavior changes, or upgrade requirements.
1.0.1
7/23/2016Release 1.0.1 is labeled as a module rewrite. The functional change in the diff is an updated implementation of `ccount` for counting character occurrences, alongside substantial tooling, build, and documentation updates.