MCPcopy Create free account
hub / github.com/apache/cloudstack / toBoolean

Function toBoolean

tools/ngui/static/js/lib/angular.js:784–792  ·  view source on GitHub ↗
(value)

Source from the content-addressed store, hash-verified

782
783
784function toBoolean(value) {
785 if (value && value.length !== 0) {
786 var v = lowercase("" + value);
787 value = !(v == 'f' || v == '0' || v == 'false' || v == 'no' || v == 'n' || v == '[]');
788 } else {
789 value = false;
790 }
791 return value;
792}
793
794/**
795 * @returns {string} Returns the string representation of the element.

Callers 2

reverseComparatorFunction · 0.85
angular.jsFile · 0.85

Calls 1

lowercaseFunction · 0.85

Tested by

no test coverage detected