extractwords
Install
$ npm install extractwords
Usage
const extractwords = ; ;//=> ['Good', 'Morning', 'how', 'are', 'you'] ;//=> ['He', "didn't", 'pay', 'for', 'his', 'meal', "m'aam"] ;//=> ['Hello', "I'm", 'gOOd'] ;//=> ['good', 'morning', 'how', 'are', 'you'] ;//=> ['Good', 'Morning.', 'how', 'are', 'you?'] ;//=> ['I', '.', 'am', '...', 'go0d', '2']
API
extractwords(str, [options])
str
Type: string
Text containing words to be extracted.
options
Type: object
lowercase
Type: boolean
Default: false
If true
, all words returned are lowercased.
punctuation
Type: boolean
Default: false
If true
, all punctuation is retained.