mirror of
https://github.com/a-nyx/maputnik-with-pmtiles.git
synced 2025-01-27 20:27:58 +01:00
Added missing file.
This commit is contained in:
parent
6cdb56d13f
commit
ffce8e3ba5
1 changed files with 17 additions and 0 deletions
17
src/libs/query-util.js
Normal file
17
src/libs/query-util.js
Normal file
|
@ -0,0 +1,17 @@
|
|||
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
|
||||
}
|
Loading…
Reference in a new issue