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

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 0.0.2
    1
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 0.0.2
    1
  • 0.0.1
    0

Package Sidebar

Install

npm i oakify

Weekly Downloads

1

Version

0.0.2

License

none

Last publish

Collaborators

  • serby