@aplus-frontend/ui
Version:
24 lines (23 loc) • 410 B
JavaScript
import { isString as a } from "lodash-unified";
function c(r, n, t) {
if (t)
return a(t) ? r[t] : t(r, n);
}
function s(r, n) {
const t = {};
return r.forEach((e, u) => {
const o = c(e, u, n);
t[o] = e;
}), t;
}
function g(r, n, t) {
return r.map((e, u) => {
const o = c(e, u, n);
return t[o] ?? e;
});
}
export {
s as arrayToObject,
c as getRowKey,
g as updateArrItem
};