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 1.0.0 to 1.1.0

2

Gruntfile.js

@@ -14,3 +14,3 @@ var fs = require('fs');

"browser" : true,
"boss" : false,
"boss" : true,
"curly" : true,

@@ -17,0 +17,0 @@ "debug" : false,

@@ -7,4 +7,6 @@ var _ = require('lodash');

delimiter: ':',
debug: false,
benchmark: false,
collections: {
auto: true
auto: true,
}

@@ -24,5 +26,11 @@ };

this.grow = function(flatData, config) {
var t1;
var localOptions = _.extend(this.options(), config || {});
var translated = [];
// optional benchmark
if (globalOptions.benchmark) {
t1 = (new Date()).getTime();
}
if (!flatData || !flatData.length) { return flatData; }

@@ -107,2 +115,8 @@

// output benchmark if enabled
if (globalOptions.benchmark) {
console.log('[treeize]: translated ' + flatData.length + ' rows in ' + ((new Date()).getTime() - t1) + 'ms');
console.log('[treeize]: stringify size ' + Math.floor(JSON.stringify(flatData).length / 1024) + 'KB => ' + Math.floor(JSON.stringify(translated).length / 1024) + 'KB');
}
return translated;

@@ -109,0 +123,0 @@ }

{
"name": "treeize",
"version": "1.0.0",
"version": "1.1.0",
"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",

@@ -46,2 +46,3 @@ treeize

delimiter: ':', // Path delimiter, as in "foo:bar:baz"
benchmark: false, // Set to true to log benchmark & compression stats
collections: {

@@ -48,0 +49,0 @@ auto: true // Defaults to pluralized detection for collections.

@@ -149,4 +149,6 @@ var treeize = require('../lib/treeize');

delimiter: ':',
debug: false,
benchmark: false,
collections: {
auto: true
auto: true,
}

@@ -153,0 +155,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