array-to-btree-object

1.0.1 • Public • Published

array-to-btree-object

This module takes a list and a comparison function, and returns an object that looks kinda like this:


{
  data: 'the-item-in-your-list',
  left: {
    data: 'another-item-in-your-list'
  },
  right: {
    data: 'another-item'
  }
}

The comparison function looks kinda like this:


function (item, treeItem) {
   return item > treeItem;
}


Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.0.1
    0
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 1.0.1
    0
  • 1.0.0
    1

Package Sidebar

Install

npm i array-to-btree-object

Weekly Downloads

1

Version

1.0.1

License

ISC

Last publish

Collaborators

  • jkatsnelson