🚧 Under Construction 🚧
npm i counting-str
Count Words
const { countWords } = require('counting-str');
countWords("Hello World"); // return 2
Count Characters
const { countCharacters } = require('counting-str');
countCharacters("Hello World"); // return 11
Count Characters without including spaces
countCharacters("Hello World", { withSpaces: false }); // return 10
Count Spaces
const { countSpaces } = require('counting-str');
countSpaces("Hello World"); //return 1
Count Vowels
const { countVowels } = require('counting-str');
countVowels("Hello World"); // return 3
Count an occurence of a Character/String in another String
const { countOccurences } = require('counting-str');
countOccurences("Hello World", "l"); // return 3
Name | Arguments | Info |
---|---|---|
countWords | String | returns # of words in a string |
countSpaces | String | returns # of spaces in a string |
countVowels | String | returns # of vowels in a string |
countCharacters | Object { withSpaces: boolean } | withSpaces: true returns # of characters included space |
countOccurences | (String, String) | returns occurences count in a string |
- make clone
- create a pull request
- feel free to open an issue
- OPEN FOR BEGINNERS AND NEW CONTRIBUTORS