synapse-react-client
Version:
[](https://badge.fury.io/js/synapse-react-client) [](https://github.com/prettier/prettie
21 lines (20 loc) • 615 B
JavaScript
import o from "lodash-es/isEmpty";
import r from "lodash-es/isEqual";
import i from "lodash-es/xorWith";
import { removeUndefined as m } from "./ObjectUtils.js";
function s(n) {
const e = [...n];
let t = e[e.length - 1];
for (; e.length > 0 && (t === void 0 || // Also remove empty objects or objects where only keys with undefined values are present
typeof t == "object" && o(m(t))); )
e.pop(), t = e[e.length - 1];
return e;
}
function u(n, e, t = r) {
return i(n, e, t).length > 0;
}
export {
u as hasDifference,
s as removeTrailingUndefinedElements
};
//# sourceMappingURL=ArrayUtils.js.map