mirror of
https://github.com/Aviortheking/codestats-readme.git
synced 2025-07-28 14:59:53 +00:00
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:
11
src/utils.js
11
src/utils.js
@ -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,
|
||||
|
Reference in New Issue
Block a user