mirror of
https://github.com/maputnik/editor.git
synced 2025-12-24 15:10:01 +00:00
18 lines
243 B
JavaScript
18 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
|
|
}
|