alexcarpenter / word-count

Get the word count from a string

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

word-count

Get the word count from a string

Installation

$ npm i @alexcarpenter/word-count

Usage

import wordCount from '@alexcarpenter/word-count';

const p =
  'Lorem ipsum dolor   sit amet consectetur adipisicing elit. Voluptates provident beatae exercitationem unde, natus debitis doloribus dolorem, dolorum numquam culpa perferendis? Incidunt iusto magnam ex, reprehenderit dolor consectetur placeat quo.';

wordCount(p); //=> 30

License

MIT.

About

Get the word count from a string

License:MIT License


Languages

Language:JavaScript 100.0%