maputnik/src/libs/query-util.js

18 lines
243 B
JavaScript
Raw Normal View History

2018-06-03 18:37:54 +02:00
function asBool(queryObj, key) {
if(queryObj.hasOwnProperty(key)) {
if(queryObj[key].match(/^false|0$/)) {
return false;
}
else {
return true;
}
}
else {
return false;
}
}
module.exports = {
asBool
}