MCPcopy
hub / github.com/lowlighter/metrics / setArg

Function setArg

source/plugins/community/splatoon/s3si/index.ts:849–861  ·  view source on GitHub ↗
(key, val, arg = undefined, collect)

Source from the content-addressed store, hash-verified

847 }
848 }
849 function setArg(key, val, arg = undefined, collect) {
850 if (arg && flags.unknownFn && !argDefined(key, arg)) {
851 if (flags.unknownFn(arg, key, val) === false) return;
852 }
853 const value = !get(flags.strings, key) && isNumber(val) ? Number(val) : val;
854 setKey(argv, key, value, collect);
855 const alias = get(aliases, key);
856 if (alias) {
857 for (const x of alias){
858 setKey(argv, x, value, collect);
859 }
860 }
861 }
862 function aliasIsBoolean(key) {
863 return getForce(aliases, key).some((x)=>typeof get(flags.bools, x) === "boolean");
864 }

Callers 1

parseFunction · 0.85

Calls 4

argDefinedFunction · 0.85
isNumberFunction · 0.85
setKeyFunction · 0.85
getFunction · 0.70

Tested by

no test coverage detected