mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-08-04 13:43:23 +00:00
chore(cloudcmd) add choose
This commit is contained in:
parent
f1310f303f
commit
076077223a
2 changed files with 17 additions and 3 deletions
|
|
@ -4,7 +4,14 @@ const env = process.env;
|
|||
const up = (a) => a.toUpperCase();
|
||||
|
||||
module.exports = parse;
|
||||
module.exports.bool = (name) => Boolean(parse(name));
|
||||
module.exports.bool = (name) => {
|
||||
const value = parse(name);
|
||||
|
||||
if (value === 'false')
|
||||
return false;
|
||||
|
||||
return value;
|
||||
};
|
||||
|
||||
function parse(name) {
|
||||
const small = `cloudcmd_${name}`;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue