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

@tsed/json-mapper

Package Overview
Dependencies
Maintainers
5
Versions
814
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@tsed/json-mapper - npm Package Compare versions

Comparing version 6.0.0-alpha.10 to 6.0.0-alpha.11

4

lib/components/ArrayMapper.js

@@ -13,6 +13,6 @@ "use strict";

deserialize(data, options) {
return [].concat(data).map(item => options.next(item));
return [].concat(data).map((item) => options.next(item));
}
serialize(data, options) {
return [].concat(data).map(item => options.next(item));
return [].concat(data).map((item) => options.next(item));
}

@@ -19,0 +19,0 @@ };

@@ -14,3 +14,3 @@ "use strict";

const obj = new Map();
Object.keys(data).forEach(key => {
Object.keys(data).forEach((key) => {
obj.set(key, ctx.next(data[key]));

@@ -17,0 +17,0 @@ });

@@ -14,3 +14,3 @@ "use strict";

const obj = new Set();
Object.keys(data).forEach(key => {
Object.keys(data).forEach((key) => {
obj.add(ctx.next(data[key]));

@@ -22,3 +22,3 @@ });

const array = [];
data.forEach(value => array.push(ctx.next(value)));
data.forEach((value) => array.push(ctx.next(value)));
return array;

@@ -25,0 +25,0 @@ }

@@ -17,6 +17,3 @@ "use strict";

serialize(object) {
return object
.toString()
.replace("Symbol(", "")
.replace(")", "");
return object.toString().replace("Symbol(", "").replace(")", "");
}

@@ -23,0 +20,0 @@ };

@@ -11,4 +11,4 @@ "use strict";

function JsonMapper(...types) {
return target => {
types.forEach(type => {
return (target) => {
types.forEach((type) => {
JsonMapperTypesContainer_1.registerJsonTypeMapper(type, target);

@@ -15,0 +15,0 @@ });

@@ -24,3 +24,3 @@ "use strict";

function OnDeserialize(cb) {
return schema_1.JsonEntityFn(storedJson => {
return schema_1.JsonEntityFn((storedJson) => {
storedJson.itemSchema.$hooks.on("onDeserialize", cb);

@@ -27,0 +27,0 @@ });

@@ -24,3 +24,3 @@ "use strict";

function OnSerialize(cb) {
return schema_1.JsonEntityFn(storedJson => {
return schema_1.JsonEntityFn((storedJson) => {
storedJson.itemSchema.$hooks.on("onSerialize", cb);

@@ -27,0 +27,0 @@ });

@@ -53,5 +53,5 @@ "use strict";

const out = new type(src);
propertiesMap.forEach(propStore => {
propertiesMap.forEach((propStore) => {
const key = propStore.parent.schema.getAliasOf(propStore.propertyName) || propStore.propertyName;
keys = keys.filter(k => k !== key);
keys = keys.filter((k) => k !== key);
let value = alterValue(propStore.schema, src[key], { ...options, self: src });

@@ -77,3 +77,3 @@ next.type = propStore.computedType;

if (additionalProperties) {
keys.forEach(key => {
keys.forEach((key) => {
out[key] = src[key];

@@ -80,0 +80,0 @@ });

{
"name": "@tsed/json-mapper",
"version": "6.0.0-alpha.10",
"version": "6.0.0-alpha.11",
"description": "Json mapper module for Ts.ED Framework",

@@ -20,7 +20,7 @@ "main": "./lib/index.js",

"dependencies": {
"@tsed/core": "6.0.0-alpha.10",
"@tsed/core": "6.0.0-alpha.11",
"tslib": "1.11.0"
},
"devDependencies": {
"@tsed/schema": "6.0.0-alpha.10"
"@tsed/schema": "6.0.0-alpha.11"
},

@@ -27,0 +27,0 @@ "scripts": {

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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