|
há 2 anos atrás | |
---|---|---|
.. | ||
index.js | há 2 anos atrás | |
license | há 2 anos atrás | |
package.json | há 2 anos atrás | |
readme.md | há 2 anos atrás |
Count characters.
npm:
npm install ccount
var ccount = require('ccount')
ccount('foo(bar(baz)', '(') // => 2
ccount('foo(bar(baz)', ')') // => 1
ccount(value, character)
Get the total count of character
in value
.
value
(string
) — Content, coerced to stringcharacter
(string
) — Single character to look fornumber
— Number of times character
occurred in value
.