infoscreens/lib/values.js

12 lines
179 B
JavaScript
Raw Normal View History

2017-11-30 21:21:40 +01:00
export function parseValue(val) {
if (typeof val === 'boolean') {
if (val) {
return 1;
}
return 0;
}
return parseFloat(val);
}
2017-11-30 21:25:56 +01:00
export default parseValue;