node/tools/eslint/node_modules/ccount
Rich Trott 31f572c3ea
tools: update to ESLint 4.3.0
PR-URL: https://github.com/nodejs/node/pull/14417
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Teddy Katz <teddy.katz@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
Reviewed-By: Refael Ackermann <refack@gmail.com>
2017-09-05 12:50:01 -04:00
..
index.js tools: update ESLint to 4.2.0 2017-09-05 12:49:53 -04:00
LICENSE tools: update ESLint to 4.2.0 2017-09-05 12:49:53 -04:00
package.json tools: update to ESLint 4.3.0 2017-09-05 12:50:01 -04:00
readme.md tools: update ESLint to 4.2.0 2017-09-05 12:49:53 -04:00

ccount Build Status Coverage Status

Count characters.

Installation

npm:

npm install ccount

Usage

var ccount = require('ccount');

ccount('foo(bar(baz)', '(') //=> 2
ccount('foo(bar(baz)', ')') //=> 1

API

ccount(value, character)

Get the total count of character in value.

Parameters
  • value (string) — Content, coerced to string
  • character (string) — Single character to look for
Returns

number — Number of times character occurred in value.

License

MIT © Titus Wormer