mirror of
https://github.com/a-nyx/maputnik-with-pmtiles.git
synced 2024-12-30 23:20:32 +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
|
|
}
|