Skip to content
This repository has been archived by the owner on Dec 22, 2022. It is now read-only.

Latest commit

 

History

History
31 lines (24 loc) · 572 Bytes

index.md

File metadata and controls

31 lines (24 loc) · 572 Bytes

$traverse connection

Deeply applies the actor function to each member of the subject

Signature

actor (Function) - Will be applied to each member of subject

subject (Object) - An object to operate on

TYPE SIGNATURES

Function -> Object -> Object
(Function, Object) -> Object

EXAMPLE

const myObject = {
    numberOfIdeas: 1,
    numberOfCommits: 2,
    numberOfPullRequests: 3
};

$traverse(x => x* 2, myObject);
// will return {
//     numberOfIdeas: 2,
//     numberOfCommits: 4,
//     numberOfPullRequests: 6
// }