UNPKG

@itwin/frontend-devtools

Version:

Debug menu and supporting UI widgets

26 lines 1.03 kB
"use strict"; /*--------------------------------------------------------------------------------------------- * Copyright (c) Bentley Systems, Incorporated. All rights reserved. * See LICENSE.md in the project root for license terms and full copyright notice. *--------------------------------------------------------------------------------------------*/ Object.defineProperty(exports, "__esModule", { value: true }); exports.parseBoolean = parseBoolean; /** @packageDocumentation * @module Utilities */ /** Parses a string case-insensitively returning true for "ON" or "TRUE", false for "OFF" or "FALSE" and undefined otherwise. * Used by various tools which take such arguments. * @beta */ function parseBoolean(arg) { if (undefined === arg) return undefined; switch (arg.toLowerCase()) { case "on": return true; case "true": return true; case "off": return false; case "false": return false; default: return undefined; } } //# sourceMappingURL=parseBoolean.js.map