New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

carnaval

Package Overview
Dependencies
Maintainers
0
Versions
22
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

carnaval - npm Package Compare versions

Comparing version 0.2.17 to 0.2.18

10

lib/Mapper.js

@@ -45,3 +45,3 @@ const TransformCodec = require('./codecs/TransformCodec');

}
_hook(event, value) {
_hook(event, value, original) {
if (!this.hooks[event]) {

@@ -52,6 +52,6 @@ return Promise.resolve(value);

if (Array.isArray(memo)) {
return Promise.map(memo, item => Promise.resolve(middleware(item, this.helpers)).then(result => result ? result : item));
return Promise.map(memo, item => Promise.resolve(middleware(item, original, this.helpers)).then(result => result ? result : item));
}
return Promise.resolve(middleware(memo, this.helpers))
return Promise.resolve(middleware(memo, original, this.helpers))
.then(result => result ? result : memo);

@@ -63,3 +63,3 @@ }, value);

.then(object => this.transformCodec.encode(object))
.then(json => this._hook('after:encode', json));
.then(json => this._hook('after:encode', json, object));
}

@@ -69,3 +69,3 @@ decode(json) {

.then(json => this.transformCodec.decode(json))
.then(object => this._hook('after:decode', object));
.then(object => this._hook('after:decode', object, json));
}

@@ -72,0 +72,0 @@ }

{
"name": "carnaval",
"version": "0.2.17",
"version": "0.2.18",
"repository": {

@@ -5,0 +5,0 @@ "type": "git",

@@ -187,3 +187,3 @@ # Carnaval

})
.afterEncode((json, providers) => {
.afterEncode((json, original, providers) => {
json.formattedName = providers.upperCase(json.name)

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

@@ -745,2 +745,4 @@ const {expect} = require('chai');

thing: {name: {alias: 'fullname'}}
}).afterDecode((box, original) => {
expect(original.fullsize).to.equal(40);
});

@@ -788,2 +790,4 @@ const json = {fullsize: 40, thing: {fullname: 'Shoes'}};

things: [{name: {alias: 'fullname'}}]
}).afterEncode((json, original) => {
expect(original.size).to.equal(40);
});

@@ -1015,3 +1019,3 @@ const boxes = new UnreferencedBoxes({size: 40, things: [new Thing({name: 'Shoes'})]});

})
.afterEncode((json, providers) => {
.afterEncode((json, original, providers) => {
json.formattedName = providers.toUpperCase(json.name);

@@ -1018,0 +1022,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