You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

19 lines
539 B

4 years ago
  1. # Shellwords
  2. Shellwords provides functions to manipulate strings according to the word parsing rules of the UNIX Bourne shell. It is based on [the Ruby module of the same name](http://www.ruby-doc.org/stdlib-1.9.3/libdoc/shellwords/rdoc/Shellwords.html).
  3. ## Installation
  4. Add "shellwords" to your `package.json` file and run `npm install`.
  5. ## Example
  6. ``` javascript
  7. var shellwords = require("shellwords");
  8. shellwords.split("foo 'bar baz'");
  9. // ["foo", "bar baz"]
  10. shellwords.escape("What's up, yo?");
  11. // 'What\\\'s\\ up,\\ yo\\?'
  12. ```