{"_id":"any-shell-escape","_rev":"330724","name":"any-shell-escape","description":"Escape and stringify an array of arguments to be executed on the shell","dist-tags":{"latest":"0.1.1"},"maintainers":[{"name":"boazy","email":"boazyan@gmail.com"}],"time":{"modified":"2021-06-07T02:46:11.000Z","created":"2014-02-23T11:28:32.628Z","0.1.1":"2014-02-27T10:11:57.749Z","0.1.0":"2014-02-23T11:28:32.628Z"},"users":{"chocolateboy":true},"repository":{"type":"git","url":"https://github.com/boazy/any-shell-escape.git"},"versions":{"0.1.1":{"name":"any-shell-escape","version":"0.1.1","description":"Escape and stringify an array of arguments to be executed on the shell","contributors":[{"name":"Dave Eddy","email":"dave@daveeddy.com","url":"http://www.daveeddy.com"},{"name":"Boaz Yaniv","email":"boazy@agatsolutions.com"}],"main":"./shell-escape.js","scripts":{"test":"for f in test/*; do echo \"$f\"; node \"$f\" || exit 1; echo; done; echo Passed; exit 0"},"repository":{"type":"git","url":"https://github.com/boazy/any-shell-escape.git"},"license":"MIT","dependencies":{},"bugs":{"url":"https://github.com/boazy/any-shell-escape/issues"},"homepage":"https://github.com/boazy/any-shell-escape","_id":"any-shell-escape@0.1.1","dist":{"shasum":"d55ab972244c71a9a5e1ab0879f30bf110806959","size":1553,"noattachment":false,"key":"/any-shell-escape/-/any-shell-escape-0.1.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/any-shell-escape/download/any-shell-escape-0.1.1.tgz"},"_from":".","_npmVersion":"1.3.21","_npmUser":{"name":"boazy","email":"boazyan@gmail.com"},"maintainers":[{"name":"boazy","email":"boazyan@gmail.com"}],"directories":{},"publish_time":1393495917749,"_hasShrinkwrap":false,"_cnpm_publish_time":1393495917749},"0.1.0":{"name":"any-shell-escape","version":"0.1.0","description":"Escape and stringify an array of arguments to be executed on the shell","contributors":[{"name":"Dave Eddy","email":"dave@daveeddy.com","url":"http://www.daveeddy.com"},{"name":"Boaz Yaniv","email":"boazy@agatsolutions.com"}],"main":"./shell-escape.js","scripts":{"test":"for f in test/*; do echo \"$f\"; node \"$f\" || exit 1; echo; done; echo Passed; exit 0"},"repository":{"type":"git","url":"https://github.com/boazy/any-shell-escape.git"},"license":"MIT","dependencies":{},"bugs":{"url":"https://github.com/boazy/any-shell-escape/issues"},"homepage":"https://github.com/boazy/any-shell-escape","_id":"any-shell-escape@0.1.0","dist":{"shasum":"c51e5c6bf2ec6657a3da02ce2a52b87651f1f6c1","size":1537,"noattachment":false,"key":"/any-shell-escape/-/any-shell-escape-0.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/any-shell-escape/download/any-shell-escape-0.1.0.tgz"},"_from":".","_npmVersion":"1.3.21","_npmUser":{"name":"boazy","email":"boazyan@gmail.com"},"maintainers":[{"name":"boazy","email":"boazyan@gmail.com"}],"directories":{},"publish_time":1393154912628,"_hasShrinkwrap":false,"_cnpm_publish_time":1393154912628}},"readme":"shell-escape\n============\n\nEscape and stringify an array of arguments to be executed on the shell\n\nInstall\n-------\n\n    npm install shell-escape\n\nExample\n-------\n\n### simple\n\n``` js\nvar shellescape = require('shell-escape');\n\nvar args = ['curl', '-v', '-H', 'Location;', '-H', 'User-Agent: dave#10', 'http://www.daveeddy.com/?name=dave&age=24'];\n\nvar escaped = shellescape(args);\nconsole.log(escaped);\n```\n\nyields\n\n```\ncurl -v -H $'Location;' -H $'User-Agent: dave#10' $'http://www.daveeddy.com/?name=dave&age=24'\n```\n\nA command suitable for being executed by the shell\n\n### advanced\n\n``` js\nvar shellescape = require('shell-escape');\n\nvar args = ['echo', 'hello!', 'how are you doing $USER', '\"double\"', \"'single'\"];\n\nvar escaped = shellescape(args);\nconsole.log(escaped);\n```\n\nyields\n\n```\necho $'hello!' $'how are you doing $USER' $'\"double\"' $'\\'single\\''\n```\n\nand when run on the shell\n\n```\n$ echo $'hello!' $'how are you doing $USER' $'\"double\"' $'\\'single\\''\nhello! how are you doing $USER \"double\" 'single'\n```\n\nLicense\n-------\n\nMIT\n","_attachments":{},"homepage":"https://github.com/boazy/any-shell-escape","bugs":{"url":"https://github.com/boazy/any-shell-escape/issues"},"license":"MIT"}