MCPcopy Create free account
hub / github.com/react-hook-form/react-hook-form / isEmptyArray

Function isEmptyArray

src/utils/unset.ts:19–26  ·  view source on GitHub ↗
(obj: unknown[])

Source from the content-addressed store, hash-verified

17}
18
19function isEmptyArray(obj: unknown[]) {
20 for (const key in obj) {
21 if (obj.hasOwnProperty(key) && !isUndefined(obj[key])) {
22 return false;
23 }
24 }
25 return true;
26}
27
28export default function unset(object: any, path: string | (string | number)[]) {
29 if (isString(path) && Object.prototype.hasOwnProperty.call(object, path)) {

Callers 1

unsetFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected