Files
json-server/utils/utils.js
2013-11-30 14:42:14 +01:00

11 lines
217 B
JavaScript

function toNative(value) {
if (value === 'true' || value === 'false') {
return value === 'true';
} else if (!isNaN(+value)) {
return +value;
} else {
return value;
}
}
exports.toNative = toNative;