wishthis/node_modules/any-shell-escape/package.json
2022-04-08 12:55:35 +02:00

32 lines
1.9 KiB
JSON

{
"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": {},
"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"
}