UNPKG

synapse-react-client

Version:

[![npm version](https://badge.fury.io/js/synapse-react-client.svg)](https://badge.fury.io/js/synapse-react-client) [![code style: prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg?style=flat-square)](https://github.com/prettier/prettie

23 lines (22 loc) 578 B
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