Software: Apache/2.4.41 (Ubuntu). PHP/8.0.30 uname -a: Linux apirnd 5.4.0-204-generic #224-Ubuntu SMP Thu Dec 5 13:38:28 UTC 2024 x86_64 uid=33(www-data) gid=33(www-data) groups=33(www-data) Safe-mode: OFF (not secure) /var/www/html/node-red/node_modules/opted/lib/ drwxr-xr-x | |
| Viewing file: Select action/file-type: var _ = require('lodash').runInContext();
module.exports = function(options, singleDash) {
return _.reduce(options, function(memo, val, key) {
val = _.isArray(val) ? val : [val];
// Loop over each value for this key so that multiple values
// can be assigned to an option
_.each(val, function(v) {
// Build the flag as --key
var flag = key.length === 1 ? key : _.kebabCase(key);
// Set = style options, e.g. --fruit=banana
if (key.slice(-1) === '=') {
flag = `${flag}=${v}`;
}
var prefix = (key.length === 1 || singleDash) ? '-' : '--';
if (v === false) {
prefix += 'no-';
}
flag = prefix + flag;
// Add the option to the list
memo.push(flag);
// Specifically allow "true" to mean "this flag has no arg with it"
if (typeof v !== 'boolean' && flag.indexOf('=') === -1) {
// Add the value to the list as well
memo.push(v);
}
});
return memo;
}, []);
};
|
:: Command execute :: | |
--[ c99shell v. 2.5 [PHP 8 Update] [24.05.2025] | Generation time: 0.0146 ]-- |