@codemask-labs/node-config
Version:
Node Config Module
19 lines • 502 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.toValueByType = void 0;
const toValueByType = (type, value) => {
switch (type) {
case Boolean: {
return Boolean(value === 'true' || value === '1');
}
case Number: {
return Number(value);
}
case String:
default: {
return value;
}
}
};
exports.toValueByType = toValueByType;
//# sourceMappingURL=to-value-by-type.js.map