Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

treetabular

Package Overview
Dependencies
Maintainers
1
Versions
25
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

treetabular - npm Package Compare versions

Comparing version 2.0.2 to 2.1.0

dist/fix-order.js

5

CHANGELOG.md
## treetabular
2.1.0 / 2017-02-06
==================
* Feature - Add `tree.fixOrder` - If children in your rows don't follow their parents you can use that helper method so they will be moved into right place. #2
2.0.2 / 2017-02-03

@@ -4,0 +9,0 @@ ==================

@@ -133,2 +133,11 @@ 'use strict';

var _fixOrder = require('./fix-order');
Object.defineProperty(exports, 'fixOrder', {
enumerable: true,
get: function get() {
return _interopRequireDefault(_fixOrder).default;
}
});
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

2

package.json
{
"name": "treetabular",
"version": "2.0.2",
"version": "2.1.0",
"description": "Tree utilities",

@@ -5,0 +5,0 @@ "scripts": {

@@ -32,3 +32,3 @@ [![build status](https://secure.travis-ci.org/reactabular/treetabular.svg)](http://travis-ci.org/reactabular/treetabular) [![bitHound Score](https://www.bithound.io/github/reactabular/treetabular/badges/score.svg)](https://www.bithound.io/github/reactabular/treetabular) [![codecov](https://codecov.io/gh/reactabular/treetabular/branch/master/graph/badge.svg)](https://codecov.io/gh/reactabular/treetabular)

If there's a `parent` relation, the children must follow their parent right after it.
If there's a `parent` relation, the children must follow their parent right after it (you might use `fixOrder` helper function if your data does not meet that criteria).

@@ -131,2 +131,10 @@ > You can find suggested default styling for the package at `style.css` in the package root.

### Helpers
**`tree.fixOrder = ({ parentField = 'parent', idField = 'id' }) => (rows) => [<rows in correct order>]`**
If children in your rows don't follow their parents you can use that helper method so they will be moved into right place.
Basically it converts `[ parent, x, y, z, children ]` into `[ parent, children, x, y, z ]`.
## Example

@@ -133,0 +141,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc