UNPKG

tupleson

Version:

A hackable JSON serializer/deserializer

8 lines (6 loc) 292 B
/** * Maps over an object or array, returning a new object or array with the same keys. * If the input is not an object or array, the input is returned. */ declare function mapOrReturn(input: unknown, fn: (val: unknown, key: number | string) => unknown): unknown; export { mapOrReturn };