mirror of
https://github.com/a-nyx/maputnik-with-pmtiles.git
synced 2024-12-28 15:51:16 +01:00
17 lines
243 B
JavaScript
17 lines
243 B
JavaScript
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
|
|
}
|