mirror of
https://github.com/maputnik/editor.git
synced 2025-12-25 15:40:00 +00:00
Added missing file.
This commit is contained in:
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
|
||||
}
|
||||
Reference in New Issue
Block a user