str-to-arr

1.0.1 • Public • Published




str-to-arr : Add words from a string to an array

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 Logo
Carlos Abraham

License

MIT License © Carlos Abraham

Readme

Keywords

Package Sidebar

Install

npm i str-to-arr

Weekly Downloads

5

Version

1.0.1

License

MIT

Unpacked Size

4.51 kB

Total Files

4

Last publish

Collaborators

  • abranhe