UNPKG

@scalar/api-client

Version:

the open source API testing client

10 lines (9 loc) 387 B
import { objectEntries as i } from "@scalar/helpers/object/object-entries"; const e = (r, t) => !r?.value || t !== "multipart/form-data" && t !== "application/x-www-form-urlencoded" ? [] : Array.isArray(r.value) ? r.value : typeof r.value == "object" && r.value ? i(r.value).map(([o, a]) => ({ name: String(o), value: a, isDisabled: !1 })) : []; export { e as getFormBodyRows };