(obj: unknown[])
| 17 | } |
| 18 | |
| 19 | function 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 | |
| 28 | export default function unset(object: any, path: string | (string | number)[]) { |
| 29 | if (isString(path) && Object.prototype.hasOwnProperty.call(object, path)) { |