UNPKG

codetrix

Version:

A lightweight lodash-style utility library

8 lines (7 loc) 255 B
import { countOccurrence } from "../../string"; describe('countOccurrences', () => { it('counts character occurrences', () => { expect(countOccurrence('banana', 'a')).toBe(3); expect(countOccurrence('hello', 'l')).toBe(2); }); });