core3-utils

@wixc3/common on Github

Home > @wixc3/common > mapObject

mapObject() function

Maps key value pairs of a plain object

Signature:

export declare function mapObject(obj: object, mapping: (entry: [string, any]) => [string, any]): {
    [k: string]: any;
};

Parameters

Parameter Type Description
obj object
mapping (entry: \[string, any\]) => \[string, any\]

Returns:

{ [k: string]: any; }