-
Notifications
You must be signed in to change notification settings - Fork 2
/
package.json
32 lines (32 loc) · 1.92 KB
/
package.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
{
"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": "[email protected]",
"url": "http://www.daveeddy.com"
},
{
"name": "Boaz Yaniv",
"email": "[email protected]"
}
],
"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": {},
"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",
"readmeFilename": "README.md",
"bugs": {
"url": "https://github.com/boazy/any-shell-escape/issues"
},
"homepage": "https://github.com/boazy/any-shell-escape"
}