1.0.1 • Published 6 years ago
str-to-arr v1.0.1
Overview
str-to-arr extract the words from a string, and store those words in an array. The words are separated by a black space/s (' ')
.
We want to accept the user to add his/her own custom regex properties, but that isn't yet covered.
Now all characters are valid strings, instead of the v1.0.0 where not any characters was supported. This version still covert the words to lower case.
I currently use this module on init-pkg-json-cli to accept multiple keywords in just one argument.
To do
- accept custom regex property for string validation.
Install
npm install str-to-arr
Usage
const strToArr = require('str-to-arr');
console.log(strToArr('This s$tring has_number3s and hyp-hens'));
// => [ 'this', 's$tring', 'has_number3s', 'and', 'hyp-hens' ]
Team
Carlos Abraham |
License
MIT License © Carlos Abraham