UNPKG

@credo-ts/core

Version:

<p align="center"> <br /> <img alt="Credo Logo" src="https://github.com/openwallet-foundation/credo-ts/blob/c7886cb8377ceb8ee4efe8d264211e561a75072d/images/credo-logo.png" height="250px" /> </p> <h1 align="center"><b>Credo - Core</b></h1

19 lines (15 loc) • 538 B
import { isObject } from "class-validator"; //#region src/modules/sd-jwt-vc/disclosureFrame.ts function buildDisclosureFrameForPayload(input) { return Object.fromEntries(Object.entries(input).map(([key, value]) => { if (Array.isArray(value)) return [key, true]; if (isObject(value)) { if (Object.keys.length === 0) return [key, false]; return [key, buildDisclosureFrameForPayload(value)]; } return [key, true]; })); } //#endregion export { buildDisclosureFrameForPayload }; //# sourceMappingURL=disclosureFrame.mjs.map