Skip to content

Latest commit

 

History

History
47 lines (34 loc) · 1.59 KB

README.md

File metadata and controls

47 lines (34 loc) · 1.59 KB

Counting STR (Counting String)

npm GitHub repo size GitHub Build status npm

Working Status

🚧 Under Construction 🚧

Installation

npm i counting-str

Usage

Count Words

const { countWords } = require('counting-str');
countWords("Hello World");

Count Characters

const { countCharacters } require('counting-str');
countCharacters("Hello World");

Count Characters without including spaces

countCharacters("Hello World", { withSpaces: false });
Name Arguments Info
countWords String returns # of words in a string
countSpaces String returns # of spaces in a string
countCharacters Object { withSpaces: boolean } withSpaces: true returns # of characters included space

Feel free to open a pull request to add more features.

  • make clone
  • create a pull request
  • feel free to open an issue