You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: README.md
+13-6
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
# Treeize.js
2
2
3
-
[](https://travis-ci.org/kwhitley/treeize)
3
+
[](https://travis-ci.org/kwhitley/treeize)
4
4
5
5
Converts row data (in JSON/associative array format or flat array format) to object/tree structure based on simple column naming conventions.
6
6
@@ -108,12 +108,14 @@ people.getData() == [
108
108
##### 1. get/set options (optional)
109
109
110
110
-[`options([options])`](#options) - getter/setter for options
111
+
-[`getOptions()`](#getOptions) - returns options
111
112
-[`setOptions(options)`](#setOptions) - merges new `[options]` with existing
112
113
-[`resetOptions()`](#resetOptions) - resets options to defaults
113
114
114
115
##### 2a. set data signature manually if needed (optional)
115
116
116
117
-[`signature([row], [options])`](#signature) - getter/setter for signature definitions
118
+
-[`getSignature()`](#getSignature) - returns currently defined signature
117
119
-[`setSignature(row, [options])`](#setSignature) - sets signature using a specific row of data/headers (preserves signature between data sets if uniformity option is enabled)
118
120
-[`clearSignature()`](#clearSignature) - clear signature between data sets (only needed when previously defined a uniform signature via `setSignature`)
119
121
@@ -127,8 +129,6 @@ people.getData() == [
127
129
128
130
##### * misc/internal methods
129
131
130
-
-[`getOptions()`](#getOptions) - returns options
131
-
-[`getSignature()`](#getSignature) - returns currently defined signature
132
132
-[`getStats()`](#getStats) - returns object with growth statistics
133
133
-[`toString()`](#toString) - uses `util` to return data in visually formatted object graph
134
134
-[`log(arg1, arg2, arg3)`](#log) - console.log output of `arg1..n` when `log` option is set to `true`
@@ -461,7 +461,7 @@ In this example, we'll take our dump (as if from a CSV or SQL result) - and name
461
461
group by movies (as if for an `/api/movies`).
462
462
463
463
```js
464
-
varmovieDump= [
464
+
varmovieData= [
465
465
{
466
466
'title':'The Prestige',
467
467
'director':'Christopher Nolan',
@@ -497,7 +497,7 @@ var movieDump = [
497
497
var Treeize =require('treeize');
498
498
var movies =newTreeize();
499
499
500
-
movies.grow(movieDump);
500
+
movies.grow(movieData);
501
501
502
502
/*
503
503
@@ -595,7 +595,7 @@ var moviesDump = [
595
595
var Treeize =require('treeize');
596
596
var actors =newTreeize();
597
597
598
-
actors.grow(movieDump);
598
+
actors.grow(moviesData);
599
599
600
600
/*
601
601
@@ -651,3 +651,10 @@ actors.grow(movieDump);
651
651
652
652
*/
653
653
```
654
+
655
+
# Changelog
656
+
657
+
### 2.0.1
658
+
659
+
- minor README modifications
660
+
- performance tuning... ~400% performance boost over 2.0.0
Copy file name to clipboardexpand all lines: package.json
+3-1
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
{
2
2
"name": "treeize",
3
-
"version": "2.0.0",
3
+
"version": "2.0.1",
4
4
"description": "Converts tabular row data (as from SQL joins, flat JSON, etc) to deep object graphs based on simple column naming conventions - without the use of an ORM or models.",
0 commit comments