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

treeize

Package Overview
Dependencies
Maintainers
1
Versions
24
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

treeize - npm Package Compare versions

Comparing version 2.0.1 to 2.0.2

5

lib/treeize.js

@@ -61,2 +61,6 @@ var util = require('util');

Treeize.prototype.getSeedData = function() {
return this.data.seed;
};
Treeize.prototype.getStats = function() {

@@ -220,2 +224,3 @@ return this.stats;

data.forEach(function(row) {
this.data.seed.push(row);
var trails = {}; // LUT for trails (find parent of new node in trails path)

@@ -222,0 +227,0 @@ var trail = root = this.data.tree; // OPTIMIZATION: do we need to reset this trail for each row?

2

package.json
{
"name": "treeize",
"version": "2.0.1",
"version": "2.0.2",
"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.",

@@ -5,0 +5,0 @@ "main": "./lib/treeize.js",

@@ -129,2 +129,3 @@ # Treeize.js

- [`getData()`](#getData) - gets current tree data
- [`getSeedData()`](#getSeedData) - gets original, flat data

@@ -263,2 +264,26 @@ ##### * misc/internal methods

### .getSeedData()<a name="getSeedData" />
Returns original, flat data.
```js
var tree = new Treeize();
tree.grow([
{ 'foo': 'bar', 'logs:a': 1 },
{ 'foo': 'bar', 'logs:a': 2 },
{ 'foo': 'baz', 'logs:a': 3 }
]);
console.log(tree.getSeedData());
/*
[
{ 'foo': 'bar', 'logs:a': 1 },
{ 'foo': 'bar', 'logs:a': 2 },
{ 'foo': 'baz', 'logs:a': 3 }
]
*/
```
### .getStats()<a name="getStats" />

@@ -265,0 +290,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