Commit a2fae1e5 authored by Athanasios's avatar Athanasios
Browse files

add toUpper and bounding box sanitizer

parent 2db63077
const toLower = (value) => { const toLower = (value) => {
if(!value) return; if (!value) return;
return value.toLowerCase(); return value.toLowerCase();
} }
module.exports = { toLower }; const toUpper = (value) => {
\ No newline at end of file if (!value) return;
return value.toUpperCase();
}
const boundingboxIsValid = (value) => {
let tokens = value.split(",");
tokens = tokens.map(token => parseFloat(token));
if (tokens[0] < tokens[2] && tokens[1] < tokens[3]) {
return true;
}
return false;
}
module.exports = { toLower, toUpper, boundingboxIsValid };
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment