MCPcopy Create free account
hub / github.com/ampproject/amphtml / stringToBool

Function stringToBool

extensions/amp-analytics/0.1/variables.js:618–627  ·  view source on GitHub ↗
(str)

Source from the content-addressed store, hash-verified

616 * @return {boolean}
617 */
618export function stringToBool(str) {
619 return (
620 str !== 'false' &&
621 str !== '' &&
622 str !== '0' &&
623 str !== 'null' &&
624 str !== 'NaN' &&
625 str !== 'undefined'
626 );
627}

Callers 3

checkSpecEnabled_Method · 0.90
calcMacroFunction · 0.85
constructorMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected