@medusajs/utils
Version:
Medusa utilities functions shared by Medusa core and Modules
14 lines • 354 B
JavaScript
Object.defineProperty(exports, "__esModule", { value: true });
exports.isTruthy = isTruthy;
/**
* Return true if the value is truthy and otherwise false
* @param val
*/
function isTruthy(val) {
if (typeof val === "string") {
return val.toLowerCase() === "true";
}
return !!val;
}
//# sourceMappingURL=is-truthy.js.map
;