split-string-words

1.1.0 • Public • Published

split-string-words

Splits a string into individual words, taking quotes into account

Install

$ npm install --save split-string-words

Usage

 
var split = require('split-string-words');
 
split('hello this is dog'); 
//=> ["hello", "this", "is", "dog"]
 
split('hello "this is dog"'); 
//=> ["hello", "this is dog"]
 
split('filename hello-world.js __winning.py'); 
//=> ["filename", "hello-world.js", "__winning.py"]

License

MIT © Tim Robinson

/split-string-words/

    Package Sidebar

    Install

    npm i split-string-words

    Weekly Downloads

    172

    Version

    1.1.0

    License

    MIT

    Unpacked Size

    3.18 kB

    Total Files

    5

    Last publish

    Collaborators

    • timjrobinson