diff options
Diffstat (limited to 'assets/node_modules/ccount/index.js')
-rw-r--r-- | assets/node_modules/ccount/index.js | 22 |
1 files changed, 0 insertions, 22 deletions
diff --git a/assets/node_modules/ccount/index.js b/assets/node_modules/ccount/index.js deleted file mode 100644 index 3051998..0000000 --- a/assets/node_modules/ccount/index.js +++ /dev/null @@ -1,22 +0,0 @@ -'use strict' - -module.exports = ccount - -function ccount(value, character) { - var val = String(value) - var count = 0 - var index - - if (typeof character !== 'string' || character.length !== 1) { - throw new Error('Expected character') - } - - index = val.indexOf(character) - - while (index !== -1) { - count++ - index = val.indexOf(character, index + 1) - } - - return count -} |