Skip to content

Commit

Permalink
v1.7.1
Browse files Browse the repository at this point in the history
  • Loading branch information
philipstanislaus committed Mar 9, 2020
1 parent 0ecfbe0 commit f8773dc
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
8 changes: 4 additions & 4 deletions build/arrayToTree.spec.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "performant-array-to-tree",
"version": "1.7.0",
"version": "1.7.1",
"description": "Converts an array of items with ids and parent ids to a nested tree in a performant `O(n)` way. Runs in browsers and node.",
"keywords": [
"array to tree",
Expand Down
8 changes: 4 additions & 4 deletions src/arrayToTree.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -250,10 +250,10 @@ describe('arrayToTree', () => {
{ id: '1', parentId: 'root', foo: 'bar' },
{ id: 'root', parentId: null, bar: 'bar' },
], { dataField: null, throwIfOrphans: true })).to.deep.equal([
{ id: "root", parentId: null, bar: "bar", children: [
{ id: "2", parentId: "root", foo: "bar", children: [] },
{ id: "1", parentId: "root", foo: "bar", children: [
{ id: "1-1", parentId: "1", foo: "bar", children: [] },
{ id: 'root', parentId: null, bar: 'bar', children: [
{ id: '2', parentId: 'root', foo: 'bar', children: [] },
{ id: '1', parentId: 'root', foo: 'bar', children: [
{ id: '1-1', parentId: '1', foo: 'bar', children: [] },
]},
]},
])
Expand Down

0 comments on commit f8773dc

Please sign in to comment.