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

@process-street/normalizr

Package Overview
Dependencies
Maintainers
3
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@process-street/normalizr - npm Package Compare versions

Comparing version 1.0.2 to 1.0.3

25

dist/normalizr.amd.js

@@ -550,5 +550,8 @@ define(['exports'], function (exports) { 'use strict';

function ObjectSchema(definition) {
var noDenormalize = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
_classCallCheck(this, ObjectSchema);
this.define(definition);
this.noDenormalize = noDenormalize;
}

@@ -580,3 +583,7 @@

return _denormalize.apply(void 0, [this.schema].concat(args));
if (this.noDenormalize) {
return args[0];
} else {
return _denormalize.apply(void 0, [this.schema].concat(args));
}
}

@@ -643,3 +650,3 @@ }]);

var entity = getEntity(id, schema);
var isInvalidObject = _typeof(entity) !== 'object' || entity === null;
var isInvalidObject = _typeof(entity) !== 'object' || entity === null || Object.keys(entity).length === 1;

@@ -696,12 +703,12 @@ if (isInvalidObject) {

var id = typeof entityOrId === 'string' ? entityOrId : entityOrId.id;
if (isImmutable$1) {
return entities.getIn([schemaKey, entityOrId.toString()]);
} else if (entities[schemaKey]) {
return entities[schemaKey][entityOrId];
} else if (typeof entityOrId === 'string') {
return entities.getIn([schemaKey, id]);
} else if (entities[schemaKey] && entities[schemaKey][id]) {
return entities[schemaKey][id];
} else {
return {
id: entityOrId
id: id
};
} else {
return entityOrId;
}

@@ -708,0 +715,0 @@ };

@@ -550,5 +550,8 @@ define(['exports'], function (exports) { 'use strict';

function ObjectSchema(definition) {
var noDenormalize = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
_classCallCheck(this, ObjectSchema);
this.define(definition);
this.noDenormalize = noDenormalize;
}

@@ -580,3 +583,7 @@

return _denormalize.apply(void 0, [this.schema].concat(args));
if (this.noDenormalize) {
return args[0];
} else {
return _denormalize.apply(void 0, [this.schema].concat(args));
}
}

@@ -643,3 +650,3 @@ }]);

var entity = getEntity(id, schema);
var isInvalidObject = _typeof(entity) !== 'object' || entity === null;
var isInvalidObject = _typeof(entity) !== 'object' || entity === null || Object.keys(entity).length === 1;

@@ -696,12 +703,12 @@ if (isInvalidObject) {

var id = typeof entityOrId === 'string' ? entityOrId : entityOrId.id;
if (isImmutable$1) {
return entities.getIn([schemaKey, entityOrId.toString()]);
} else if (entities[schemaKey]) {
return entities[schemaKey][entityOrId];
} else if (typeof entityOrId === 'string') {
return entities.getIn([schemaKey, id]);
} else if (entities[schemaKey] && entities[schemaKey][id]) {
return entities[schemaKey][id];
} else {
return {
id: entityOrId
id: id
};
} else {
return entityOrId;
}

@@ -708,0 +715,0 @@ };

@@ -551,5 +551,8 @@ (function (exports) {

function ObjectSchema(definition) {
var noDenormalize = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
_classCallCheck(this, ObjectSchema);
this.define(definition);
this.noDenormalize = noDenormalize;
}

@@ -581,3 +584,7 @@

return _denormalize.apply(void 0, [this.schema].concat(args));
if (this.noDenormalize) {
return args[0];
} else {
return _denormalize.apply(void 0, [this.schema].concat(args));
}
}

@@ -644,3 +651,3 @@ }]);

var entity = getEntity(id, schema);
var isInvalidObject = _typeof(entity) !== 'object' || entity === null;
var isInvalidObject = _typeof(entity) !== 'object' || entity === null || Object.keys(entity).length === 1;

@@ -697,12 +704,12 @@ if (isInvalidObject) {

var id = typeof entityOrId === 'string' ? entityOrId : entityOrId.id;
if (isImmutable$1) {
return entities.getIn([schemaKey, entityOrId.toString()]);
} else if (entities[schemaKey]) {
return entities[schemaKey][entityOrId];
} else if (typeof entityOrId === 'string') {
return entities.getIn([schemaKey, id]);
} else if (entities[schemaKey] && entities[schemaKey][id]) {
return entities[schemaKey][id];
} else {
return {
id: entityOrId
id: id
};
} else {
return entityOrId;
}

@@ -709,0 +716,0 @@ };

@@ -551,5 +551,8 @@ (function (exports) {

function ObjectSchema(definition) {
var noDenormalize = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
_classCallCheck(this, ObjectSchema);
this.define(definition);
this.noDenormalize = noDenormalize;
}

@@ -581,3 +584,7 @@

return _denormalize.apply(void 0, [this.schema].concat(args));
if (this.noDenormalize) {
return args[0];
} else {
return _denormalize.apply(void 0, [this.schema].concat(args));
}
}

@@ -644,3 +651,3 @@ }]);

var entity = getEntity(id, schema);
var isInvalidObject = _typeof(entity) !== 'object' || entity === null;
var isInvalidObject = _typeof(entity) !== 'object' || entity === null || Object.keys(entity).length === 1;

@@ -697,12 +704,12 @@ if (isInvalidObject) {

var id = typeof entityOrId === 'string' ? entityOrId : entityOrId.id;
if (isImmutable$1) {
return entities.getIn([schemaKey, entityOrId.toString()]);
} else if (entities[schemaKey]) {
return entities[schemaKey][entityOrId];
} else if (typeof entityOrId === 'string') {
return entities.getIn([schemaKey, id]);
} else if (entities[schemaKey] && entities[schemaKey][id]) {
return entities[schemaKey][id];
} else {
return {
id: entityOrId
id: id
};
} else {
return entityOrId;
}

@@ -709,0 +716,0 @@ };

@@ -548,5 +548,8 @@ function _typeof(obj) {

function ObjectSchema(definition) {
var noDenormalize = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
_classCallCheck(this, ObjectSchema);
this.define(definition);
this.noDenormalize = noDenormalize;
}

@@ -578,3 +581,7 @@

return _denormalize.apply(void 0, [this.schema].concat(args));
if (this.noDenormalize) {
return args[0];
} else {
return _denormalize.apply(void 0, [this.schema].concat(args));
}
}

@@ -641,3 +648,3 @@ }]);

var entity = getEntity(id, schema);
var isInvalidObject = _typeof(entity) !== 'object' || entity === null;
var isInvalidObject = _typeof(entity) !== 'object' || entity === null || Object.keys(entity).length === 1;

@@ -694,12 +701,12 @@ if (isInvalidObject) {

var id = typeof entityOrId === 'string' ? entityOrId : entityOrId.id;
if (isImmutable$1) {
return entities.getIn([schemaKey, entityOrId.toString()]);
} else if (entities[schemaKey]) {
return entities[schemaKey][entityOrId];
} else if (typeof entityOrId === 'string') {
return entities.getIn([schemaKey, id]);
} else if (entities[schemaKey] && entities[schemaKey][id]) {
return entities[schemaKey][id];
} else {
return {
id: entityOrId
id: id
};
} else {
return entityOrId;
}

@@ -706,0 +713,0 @@ };

@@ -548,5 +548,8 @@ function _typeof(obj) {

function ObjectSchema(definition) {
var noDenormalize = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
_classCallCheck(this, ObjectSchema);
this.define(definition);
this.noDenormalize = noDenormalize;
}

@@ -578,3 +581,7 @@

return _denormalize.apply(void 0, [this.schema].concat(args));
if (this.noDenormalize) {
return args[0];
} else {
return _denormalize.apply(void 0, [this.schema].concat(args));
}
}

@@ -641,3 +648,3 @@ }]);

var entity = getEntity(id, schema);
var isInvalidObject = _typeof(entity) !== 'object' || entity === null;
var isInvalidObject = _typeof(entity) !== 'object' || entity === null || Object.keys(entity).length === 1;

@@ -694,12 +701,12 @@ if (isInvalidObject) {

var id = typeof entityOrId === 'string' ? entityOrId : entityOrId.id;
if (isImmutable$1) {
return entities.getIn([schemaKey, entityOrId.toString()]);
} else if (entities[schemaKey]) {
return entities[schemaKey][entityOrId];
} else if (typeof entityOrId === 'string') {
return entities.getIn([schemaKey, id]);
} else if (entities[schemaKey] && entities[schemaKey][id]) {
return entities[schemaKey][id];
} else {
return {
id: entityOrId
id: id
};
} else {
return entityOrId;
}

@@ -706,0 +713,0 @@ };

@@ -552,5 +552,8 @@ 'use strict';

function ObjectSchema(definition) {
var noDenormalize = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
_classCallCheck(this, ObjectSchema);
this.define(definition);
this.noDenormalize = noDenormalize;
}

@@ -582,3 +585,7 @@

return _denormalize.apply(void 0, [this.schema].concat(args));
if (this.noDenormalize) {
return args[0];
} else {
return _denormalize.apply(void 0, [this.schema].concat(args));
}
}

@@ -645,3 +652,3 @@ }]);

var entity = getEntity(id, schema);
var isInvalidObject = _typeof(entity) !== 'object' || entity === null;
var isInvalidObject = _typeof(entity) !== 'object' || entity === null || Object.keys(entity).length === 1;

@@ -698,12 +705,12 @@ if (isInvalidObject) {

var id = typeof entityOrId === 'string' ? entityOrId : entityOrId.id;
if (isImmutable$1) {
return entities.getIn([schemaKey, entityOrId.toString()]);
} else if (entities[schemaKey]) {
return entities[schemaKey][entityOrId];
} else if (typeof entityOrId === 'string') {
return entities.getIn([schemaKey, id]);
} else if (entities[schemaKey] && entities[schemaKey][id]) {
return entities[schemaKey][id];
} else {
return {
id: entityOrId
id: id
};
} else {
return entityOrId;
}

@@ -710,0 +717,0 @@ };

@@ -552,5 +552,8 @@ 'use strict';

function ObjectSchema(definition) {
var noDenormalize = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
_classCallCheck(this, ObjectSchema);
this.define(definition);
this.noDenormalize = noDenormalize;
}

@@ -582,3 +585,7 @@

return _denormalize.apply(void 0, [this.schema].concat(args));
if (this.noDenormalize) {
return args[0];
} else {
return _denormalize.apply(void 0, [this.schema].concat(args));
}
}

@@ -645,3 +652,3 @@ }]);

var entity = getEntity(id, schema);
var isInvalidObject = _typeof(entity) !== 'object' || entity === null;
var isInvalidObject = _typeof(entity) !== 'object' || entity === null || Object.keys(entity).length === 1;

@@ -698,12 +705,12 @@ if (isInvalidObject) {

var id = typeof entityOrId === 'string' ? entityOrId : entityOrId.id;
if (isImmutable$1) {
return entities.getIn([schemaKey, entityOrId.toString()]);
} else if (entities[schemaKey]) {
return entities[schemaKey][entityOrId];
} else if (typeof entityOrId === 'string') {
return entities.getIn([schemaKey, id]);
} else if (entities[schemaKey] && entities[schemaKey][id]) {
return entities[schemaKey][id];
} else {
return {
id: entityOrId
id: id
};
} else {
return entityOrId;
}

@@ -710,0 +717,0 @@ };

@@ -554,5 +554,8 @@ (function (global, factory) {

function ObjectSchema(definition) {
var noDenormalize = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
_classCallCheck(this, ObjectSchema);
this.define(definition);
this.noDenormalize = noDenormalize;
}

@@ -584,3 +587,7 @@

return _denormalize.apply(void 0, [this.schema].concat(args));
if (this.noDenormalize) {
return args[0];
} else {
return _denormalize.apply(void 0, [this.schema].concat(args));
}
}

@@ -647,3 +654,3 @@ }]);

var entity = getEntity(id, schema);
var isInvalidObject = _typeof(entity) !== 'object' || entity === null;
var isInvalidObject = _typeof(entity) !== 'object' || entity === null || Object.keys(entity).length === 1;

@@ -700,12 +707,12 @@ if (isInvalidObject) {

var id = typeof entityOrId === 'string' ? entityOrId : entityOrId.id;
if (isImmutable$1) {
return entities.getIn([schemaKey, entityOrId.toString()]);
} else if (entities[schemaKey]) {
return entities[schemaKey][entityOrId];
} else if (typeof entityOrId === 'string') {
return entities.getIn([schemaKey, id]);
} else if (entities[schemaKey] && entities[schemaKey][id]) {
return entities[schemaKey][id];
} else {
return {
id: entityOrId
id: id
};
} else {
return entityOrId;
}

@@ -712,0 +719,0 @@ };

@@ -554,5 +554,8 @@ (function (global, factory) {

function ObjectSchema(definition) {
var noDenormalize = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
_classCallCheck(this, ObjectSchema);
this.define(definition);
this.noDenormalize = noDenormalize;
}

@@ -584,3 +587,7 @@

return _denormalize.apply(void 0, [this.schema].concat(args));
if (this.noDenormalize) {
return args[0];
} else {
return _denormalize.apply(void 0, [this.schema].concat(args));
}
}

@@ -647,3 +654,3 @@ }]);

var entity = getEntity(id, schema);
var isInvalidObject = _typeof(entity) !== 'object' || entity === null;
var isInvalidObject = _typeof(entity) !== 'object' || entity === null || Object.keys(entity).length === 1;

@@ -700,12 +707,12 @@ if (isInvalidObject) {

var id = typeof entityOrId === 'string' ? entityOrId : entityOrId.id;
if (isImmutable$1) {
return entities.getIn([schemaKey, entityOrId.toString()]);
} else if (entities[schemaKey]) {
return entities[schemaKey][entityOrId];
} else if (typeof entityOrId === 'string') {
return entities.getIn([schemaKey, id]);
} else if (entities[schemaKey] && entities[schemaKey][id]) {
return entities[schemaKey][id];
} else {
return {
id: entityOrId
id: id
};
} else {
return entityOrId;
}

@@ -712,0 +719,0 @@ };

{
"name": "@process-street/normalizr",
"version": "1.0.2",
"version": "1.0.3",
"description": "Normalizes and denormalizes JSON according to schema for Redux and Flux applications",

@@ -54,8 +54,8 @@ "bugs": {

"devDependencies": {
"@babel/core": "^7.3.3",
"@babel/core": "^7.3.4",
"@babel/plugin-external-helpers": "^7.2.0",
"@babel/plugin-proposal-class-properties": "^7.3.3",
"@babel/plugin-proposal-object-rest-spread": "^7.3.2",
"@babel/plugin-proposal-class-properties": "^7.3.4",
"@babel/plugin-proposal-object-rest-spread": "^7.3.4",
"@babel/plugin-transform-modules-commonjs": "^7.2.0",
"@babel/preset-env": "^7.3.1",
"@babel/preset-env": "^7.3.4",
"@process-street/subgrade": "^1.3.7",

@@ -62,0 +62,0 @@ "babel-eslint": "^10.0.1",

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