Package Exports
- substr-occurrence
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (substr-occurrence) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
Substr Occurrence
A small, extremely lightweight library that counts the number of occurrences of a substring or single character in a larger string. Created because string-occurrence was too bloated and slow.
Installation
npm install codetheweb/substr-occurrence
Usage
var occurrence = require('substr-occurrence');
console.log(occurrence('o', 'foo bar');
Output should be 2
.
Tests
npm test