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

Function irtpStringToBoolean

third_party/subscriptions-project/swg.js:13353–13362  ·  view source on GitHub ↗

* Convert String value of isReadyToPay * (from JSON or Cache) to a boolean value. * @param {string} value * @return {boolean|undefined} * @private

(value)

Source from the content-addressed store, hash-verified

13351 * @private
13352 */
13353function irtpStringToBoolean(value) {
13354 switch (value) {
13355 case 'true':
13356 return true;
13357 case 'false':
13358 return false;
13359 default:
13360 return undefined;
13361 }
13362}
13363
13364/**
13365 * Copyright 2018 The Subscribe with Google Authors. All Rights Reserved.

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected