UNPKG

@mee4dy/crud

Version:

Create a backend and frontend in 5 minutes! With our powerful full stack crud system, customize it to suit you.

12 lines (11 loc) 397 B
function i(r, e) { return typeof r == "string" && (r.includes(":pk") && (r = r.replace(":pk", e)), r === "pk" && (r = e)), typeof r == "object" && (r.key === "pk" && (r.key = e), r.field === "pk" && (r.field = e)), r; } function n(r, e) { return Array.isArray(r) ? r.map((f) => (f.pk = f[e], f)) : r; } export { i as replacePK, n as replacePKItems }; //# sourceMappingURL=pk.helper.js.map