@hazae41/x509
Version:
Zero-copy X.509 certificates in pure modern TypeScript
1 lines • 600 B
Source Map (JSON)
{"version":3,"file":"index.mjs","sources":["../../../../src/libs/invert/index.ts"],"sourcesContent":["export type Inverted<T extends Record<PropertyKey, PropertyKey>> = {\n [K in keyof T as T[K]]: K\n}\n\nexport function invert<T extends Record<PropertyKey, PropertyKey>>(object: T) {\n return Object.fromEntries(Object.entries(object).map(([k, v]) => [v, k])) as Inverted<T>\n}"],"names":[],"mappings":"AAIM,SAAU,MAAM,CAA6C,MAAS,EAAA;AAC1E,IAAA,OAAO,MAAM,CAAC,WAAW,CAAC,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAgB;AAC1F;;;;"}