1.0.0 • Published 5 years ago

recursive-map v1.0.0

Weekly downloads
-
License
MIT
Repository
-
Last release
5 years ago

recursive-map

Install

This project uses node and npm. Go check them out if you don't have them locally installed.

npm install --save recursive-map

Then with a module bundler like webpack or rollup, use as you would anything else:

import { recursiveMap, mapTree } from 'recursive-map';

API

Table of Contents

mapTree

Parameters

  • fn function Function that produces a new tree object
  • childkey string Reference key to the children nodes in the object
  • node Object The node to be traversed to

Returns Object A new tree being the result of the callback function

recursiveMap

Parameters

  • fn function Function that produces an element for the new Array of trees
  • childkey string Reference key to the children nodes in the object
  • arr Array<Object> The Array of trees to be mapped

Returns Array<Object> A new array of trees with each tree being the result of the callback function

1.0.0

5 years ago

0.2.0

6 years ago

0.1.2

6 years ago

0.1.1

6 years ago

0.1.0

6 years ago

0.0.4

6 years ago

0.0.3

6 years ago

0.0.1

6 years ago