This package is a small utility that helps you find how frequently a substring
occurs in another string.
When should I use this?
I find this particularly useful when generating code, for example, when building
a string that can either be double or single quoted.
I use this utility to choose single quotes when double quotes are used more
frequently, and double quotes otherwise.
Install
This package is ESM only.
In Node.js (version 12.20+, 14.14+, or 16.0+), install with npm:
This package is at least compatible with all maintained versions of Node.js.
As of now, that is Node.js 12.20+, 14.14+, and 16.0+.
It also works in Deno and modern browsers.