uralsjs-map-record
TypeScript icon, indicating that this package has built-in type declarations

0.0.2 • Public • Published

uralsjs-map-record

Record mapping function

API

/**
 * Map values of record to same-keys record
 */
export function mapRecordVals<M, K>(
    r: Record<(string|number|symbol), M>, 
    mapFunc: (m: M) => K
): Record<string|number|symbol, K>

/**
 * Map keys of record to same-values record
 */
export function mapRecordKeys<M>(
    r: Record<(string|number|symbol), M>, 
    mapFunc: (m: string|number|symbol) => string|number|symbol
): Record<string|number|symbol, M>

Author

Anatoly Starodubtsev tostar74@mail.ru

License

MIT

Readme

Keywords

none

Package Sidebar

Install

npm i uralsjs-map-record

Weekly Downloads

2

Version

0.0.2

License

ISC

Unpacked Size

7.88 kB

Total Files

10

Last publish

Collaborators

  • pantagruel74