chris 5053cbcf44 refactor: Reorganize project structure and clean up repository
This commit reflects an intentional reorganization of the project.

- Deletes obsolete root-level files.
- Restructures the admin and gallery components.
- Tracks previously untracked application modules.
2025-11-24 15:15:35 -05:00

43 lines
776 B
JavaScript

/**
* Escape the given shell `arg`.
*
* @param {String} arg
* @return {String}
* @api public
*/
exports.escape = function escape (arg) {
return '"' + String(arg).trim().replace(/"/g, '\\"') + '"';
};
exports.unescape = function escape (arg) {
return String(arg).trim().replace(/"/g, "");
};
exports.argsToArray = function (args) {
var arr = [];
for (var i = 0; i <= arguments.length; i++) {
if ('undefined' != typeof arguments[i])
arr.push(arguments[i]);
}
return arr;
};
exports.isUtil = function (v) {
var ty = 'object';
switch (Object.prototype.toString.call(v)) {
case '[object String]':
ty = 'String';
break;
case '[object Array]':
ty = 'Array';
break;
case '[object Boolean]':
ty = 'Boolean';
break;
}
return ty;
}