Extract the words from a string
Install
npm install extractwords
Usage
import extractWords from 'extractwords';
extractWords('Good morning, how are you?');
extractWords("He didn't pay for his meal m'aam");
extractWords("17651Hello*&!(*2I'm_++`~gOOd 2");
extractWords('Good morning, how are you?', {lowercase: true});
extractWords('Good Morning. how are you?', {punctuation: true});
extractWords('I . am ... go0d 2', {punctuation: true});
API
input
Type: string
Text containing words to be extracted.
options
Type: object
lowercase
Type: boolean
Default: false
Whether all words returned are lowercased.
punctuation
Type: boolean
Default: false
Whether all punctuation is retained.