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

restruct-data

Package Overview
Dependencies
Maintainers
1
Versions
32
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

restruct-data - npm Package Compare versions

Comparing version 0.2.8 to 0.2.9

2

package.json
{
"name": "restruct-data",
"version": "0.2.8",
"version": "0.2.9",
"description": "ERROR: No README data found!",

@@ -5,0 +5,0 @@ "main": "restruct.js",

@@ -70,4 +70,2 @@

result[k] = fill(v, data);
else if(typeof v === 'number')
result[k] = v;
else if(Array.isArray(v)) {

@@ -117,6 +115,11 @@ if (typeof v[0] === 'string')

restruct.prototype.extend_list = function (rows, struct, result) {
for (var i in rows) {
rows[i][restruct.indexKey] = parseInt(i);
this.extend(rows[i], struct, result);
if (rows.length === 0) {
this.extend({}, struct, result);
}
else {
for (var i in rows) {
rows[i][restruct.indexKey] = parseInt(i);
this.extend(rows[i], struct, result);
}
}
return result;

@@ -123,0 +126,0 @@ }

@@ -169,13 +169,1 @@

console.log(json(data,true))
/* test if restruct handles integers */
var struct = {
"< test": {
"integer_test": 1
}
}
var data = restruct({
"test": "Test",
}, struct);
console.log(json(data,true))
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