INNER CODE UNIT · TypeScript
Promise
amplify-education/serverless-domain-manager · src/utils.ts:11
return new Promise((resolve) => setTimeout(resolve, 1000 * seconds));
}
/**
* Determines whether this boolean config is configured to true or false.
*
* This method evaluates a customDomain property to see if it's true or false.
* If the property's value is undefined, the default value is returned.
* If the property's value is provided, this should be boolean, or a string parseable as boolean,
* otherwise an exception is thrown.
* @param {boolean|string} value the config value provided
* @param {boolean} defaultValue the default value to return, if config value is undefined
* @returns {boolean} the parsed boolean from the config value, or the default value
*/
function evaluateBoolean (value: any, defaultValue: boolean): boolean {
if (value === undefined) {
return defaultValue;
}