@gitrows/gitrows-utils
Advanced tools
Comparing version 0.3.4 to 0.3.5
@@ -257,2 +257,20 @@ const Data={ | ||
empty: (obj, deep = false) => { | ||
if (Object.keys(obj).length === 0 && obj.constructor === Object) | ||
return deep?Data.empty(Object.values(obj),true):true; | ||
if (Array.isArray(obj)){ | ||
if (obj.length === 0) | ||
return true; | ||
if (deep) | ||
obj.forEach((item) => { | ||
if (item.length !== 0) | ||
return false | ||
}); | ||
return false; | ||
} | ||
if (obj === null) return true; | ||
return false; | ||
}, | ||
max: arr => arr.sort((a,b)=>a-b).pop(), | ||
@@ -259,0 +277,0 @@ |
{ | ||
"name": "@gitrows/gitrows-utils", | ||
"version": "0.3.4", | ||
"version": "0.3.5", | ||
"description": "Data and string handling utilities for @gitrows", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
25484
834