Files
pezkuwi-api/packages/papi-utils/dist/esm/mapObject.mjs
T
pezkuwichain 31467f90d4 feat: add PAPI rebrand packages
- @pezkuwi/papi-utils (rebrand of @polkadot-api/utils)
- @pezkuwi/bizinikiwi-bindings (rebrand of @polkadot-api/substrate-bindings)
- @pezkuwi/metadata-builders (rebrand of @polkadot-api/metadata-builders)
- @pezkuwi/merkleize-metadata (rebrand of @polkadot-api/merkleize-metadata)

All @polkadot-api references replaced with @pezkuwi equivalents.
2026-01-22 15:40:12 +03:00

14 lines
377 B
JavaScript

function mapObject(input, mapper) {
return Object.fromEntries(
Object.entries(input).map(
([key, value]) => [key, mapper(value, key)]
)
);
}
const mapStringRecord = (input, mapper) => Object.fromEntries(
Object.entries(input).map(([key, value]) => [key, mapper(value, key)])
);
export { mapObject, mapStringRecord };
//# sourceMappingURL=mapObject.mjs.map