You're Invited: Meet the Socket team at BSidesSF and RSAC - April 27 - May 1.RSVP
Socket
Sign inDemoInstall
Socket

@the-grid/immutable

Package Overview
Dependencies
Maintainers
11
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@the-grid/immutable - npm Package Compare versions

Comparing version

to
1.1.4

CHANGES.md

26

lib/struct/Struct.js

@@ -129,2 +129,4 @@ 'use strict';

var schemaKeys = [];
for (var keyPath in schema) {

@@ -138,2 +140,5 @@

}
schemaKeys.push(keyPath);
//if (keyPath === 'DEBUG') {

@@ -245,2 +250,3 @@ // DEBUG = keyConfig

var _set = RecordType.prototype.set;
var _toJS = RecordType.prototype.toJS;

@@ -419,2 +425,19 @@ var StructType = function (_RecordType) {

// toJS( includeComputed = false )
// ---------------------------------------------------
StructType.prototype.toJS = function toJS(includeComputed) {
if (!includeComputed) return _toJS.call(this);
var result = {};
for (var i = 0; i < schemaKeys.length; i++) {
var key = schemaKeys[i];
var val = this.get(key);
result[key] = val.toJS ? val.toJS(includeComputed) : val;
}
return result;
};
return StructType;

@@ -443,2 +466,5 @@ }(RecordType);

StructType.schema = schema;
//StructType.cacheReset = cacheReset
return StructType;

@@ -445,0 +471,0 @@ };

2

package.json
{
"name": "@the-grid/immutable",
"version": "1.1.3",
"version": "1.1.4",
"description": "Describe struct here",

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

@@ -20,3 +20,2 @@ # @the-grid/immutable

[coveralls-badge]: https://img.shields.io/coveralls/user/repo/master.svg?style=flat-square
[coveralls]: https://coveralls.io/github/user/repo
[coveralls]: https://coveralls.io/github/user/repo