MCPcopy Index your code
hub / github.com/bugy/script-server / isEmptyValue

Function isEmptyValue

web-src/src/common/utils/common.js:37–51  ·  view source on GitHub ↗
(value)

Source from the content-addressed store, hash-verified

35}
36
37export function isEmptyValue(value) {
38 if (isNull(value)) {
39 return true;
40 }
41
42 if ((typeof value === 'string') || (Array.isArray(value))) {
43 return value.length === 0;
44 }
45
46 if (typeof value === 'object') {
47 return isEmptyObject(value);
48 }
49
50 return false;
51}
52
53export function isEmptyObject(obj) {
54 if (isNull(obj)) {

Callers 2

initFromParametersFunction · 0.90
removeEmptyValuesFunction · 0.90

Calls 2

isNullFunction · 0.85
isEmptyObjectFunction · 0.85

Tested by

no test coverage detected