oakify

0.0.2 • Public • Published

oakify

Take a list of items related by a parent property and make a tree.

Installation

npm install --save oakify

Usage

 
var oakify = require('..')
  , list =
  [ { _id: 1
    , parent: null }
  , { _id: 2
    , parent: 1 }
  , { _id: 3
    , parent: 2 }
  , { _id: 4
    , parent: 2 }
  , { _id: 5
    , parent: 4 }
  ]
  , tree = oakify(list)
 

Credits

Built by developers at Clock.

Licence

Licensed under the New BSD License

Readme

Keywords

none

Package Sidebar

Install

npm i oakify

Weekly Downloads

1

Version

0.0.2

License

none

Last publish

Collaborators

  • serby