MCPcopy Create free account
hub / github.com/bitwarden/clients / convertBooleanOption

Method convertBooleanOption

apps/cli/src/utils.ts:269–277  ·  view source on GitHub ↗
(optionValue: any)

Source from the content-addressed store, hash-verified

267 }
268
269 static convertBooleanOption(optionValue: any): boolean {
270 if (typeof optionValue === "boolean") {
271 return optionValue;
272 }
273 if (typeof optionValue === "string") {
274 return optionValue === "" || optionValue.toLowerCase() === "true";
275 }
276 return false;
277 }
278
279 static convertNumberOption(optionValue: any, defaultValue: number) {
280 try {

Callers 6

utils.spec.tsFile · 0.80
constructorMethod · 0.80
constructorMethod · 0.80
constructorMethod · 0.80
constructorMethod · 0.80
constructorMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected