mirror of https://gitgud.io/fatchan/gm
parent
f60627d226
commit
d287d2b0ef
3 changed files with 30 additions and 2 deletions
@ -0,0 +1,14 @@ |
||||
|
||||
// gm - Copyright Aaron Heckmann <aaron.heckmann+github@gmail.com> (MIT Licensed)
|
||||
|
||||
/** |
||||
* Escape the given shell `arg`. |
||||
* |
||||
* @param {String} arg |
||||
* @return {String} |
||||
* @api public |
||||
*/ |
||||
|
||||
exports.escape = function escape (arg) { |
||||
return '"' + String(arg).trim().replace(/"/g, '\\"') + '"'; |
||||
} |
Loading…
Reference in new issue