Initial commit

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
dinlo
2026-05-31 18:45:31 +08:00
commit e0a986eb30
1018 changed files with 615974 additions and 0 deletions
+17
View File
@@ -0,0 +1,17 @@
module.exports = shellescape;
// return a shell compatible format
function shellescape(a) {
var ret = [];
a.forEach(function(s) {
if (!/^[A-Za-z0-9_\/-]+$/.test(s)) {
s = "'"+s.replace(/'/g,"'\\''")+"'";
s = s.replace(/^(?:'')+/g, '') // unduplicate single-quote at the beginning
.replace(/\\'''/g, "\\'" ); // remove non-escaped single-quote if there are enclosed between 2 escaped
}
ret.push(s);
});
return ret.join(' ');
}