flow like the river
This commit is contained in:
commit
013fe673f3
42435 changed files with 5764238 additions and 0 deletions
14
BACK_BACK/node_modules/coa/lib/shell.js
generated
vendored
Executable file
14
BACK_BACK/node_modules/coa/lib/shell.js
generated
vendored
Executable file
|
|
@ -0,0 +1,14 @@
|
|||
module.exports = { escape, unescape };
|
||||
|
||||
function unescape(w) {
|
||||
w = w.charAt(0) === '"'
|
||||
? w.replace(/^"|([^\\])"$/g, '$1')
|
||||
: w.replace(/\\ /g, ' ');
|
||||
|
||||
return w.replace(/\\("|'|\$|`|\\)/g, '$1');
|
||||
}
|
||||
|
||||
function escape(w) {
|
||||
w = w.replace(/(["'$`\\])/g,'\\$1');
|
||||
return w.match(/\s+/) ? `"${w}"` : w;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue