fix: hide parameter array implementation (#162)

* fix: hide paramter array implementation

* chore: parseArray str check

* docs: updated readme

* chore: add codecov threshold

* docs: update docs
This commit is contained in:
Anurag Hazra
2020-07-23 21:01:23 +05:30
committed by GitHub
parent c2adcfd6fe
commit aa44bd7615
7 changed files with 35 additions and 35 deletions

View File

@ -44,12 +44,9 @@ function parseBoolean(value) {
}
}
function parseJSON(str) {
try {
return JSON.parse(str);
} catch (err) {
return [];
}
function parseArray(str) {
if (!str) return [];
return str.split(",");
}
function clampValue(number, min, max) {
@ -141,7 +138,7 @@ module.exports = {
encodeHTML,
isValidHexColor,
request,
parseJSON,
parseArray,
parseBoolean,
fallbackColor,
FlexLayout,