MCPcopy Create free account
hub / github.com/microsoft/SandDance / valueToBoolean

Function valueToBoolean

docs/tests/v2/es6/js/sanddance.js:153007–153019  ·  view source on GitHub ↗
(value)

Source from the content-addressed store, hash-verified

153005// Copyright (c) Microsoft Corporation. All rights reserved.
153006// Licensed under the MIT license.
153007function valueToBoolean(value) {
153008 if (typeof value === 'string') {
153009 switch (value.toLowerCase()) {
153010 case 'true':
153011 return true;
153012
153013 case 'false':
153014 return false;
153015 }
153016 }
153017
153018 return !!value;
153019}
153020
153021function valueToString(value) {
153022 if (value == null) {

Callers 2

constructorMethod · 0.70
runExpressionOnColumnMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected