'use strict'; module.exports = function quote(xs) { return xs.map(function (s) { if (s && typeof s === 'object') { return s.op.replace(/(.)/g, '\\$1'); } if ((/["\s]/).test(s) && !(/'/).test(s)) { return "'" + s.replace(/(['\\])/g, '\\$1') + "'"; } if ((/["'\s]/).test(s)) { return '"' + s.replace(/(["\\$`!])/g, '\\$1') + '"'; } return String(s).replace(/([A-Za-z]:)?([#!"$&'()*,:;<=>?@[\\\]^`{|}])/g, '$1\\$2'); }).join(' '); };
Name | Type | Size | Permission | Actions |
---|---|---|---|---|
.github | Folder | 0755 |
|
|
example | Folder | 0755 |
|
|
test | Folder | 0755 |
|
|
.eslintrc | File | 493 B | 0644 |
|
.nycrc | File | 229 B | 0644 |
|
CHANGELOG.md | File | 20.81 KB | 0644 |
|
LICENSE | File | 1.08 KB | 0644 |
|
README.md | File | 3.56 KB | 0644 |
|
index.js | File | 87 B | 0644 |
|
package.json | File | 1.71 KB | 0644 |
|
parse.js | File | 5.07 KB | 0644 |
|
quote.js | File | 457 B | 0644 |
|
security.md | File | 295 B | 0644 |
|