synapse-react-client
Version:
[](https://badge.fury.io/js/synapse-react-client) [](https://github.com/prettier/prettie
23 lines (22 loc) • 578 B
JavaScript
import u from "lodash-es/isArray";
import d from "lodash-es/isObject";
function c(i) {
if (!i || !d(i)) return [];
const f = /* @__PURE__ */ new Set(), o = /* @__PURE__ */ new Set();
function e(r) {
if (!(!d(r) || o.has(r))) {
if (o.add(r), u(r.required))
for (const t of r.required)
typeof t == "string" && f.add(t);
["allOf"].forEach((t) => {
const n = r[t];
u(n) && n.forEach((l) => e(l));
});
}
}
return e(i), Array.from(f);
}
export {
c as default
};
//# sourceMappingURL=getRequiredAttributes.js.map