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

vogels

Package Overview
Dependencies
Maintainers
1
Versions
55
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vogels - npm Package Compare versions

Comparing version 0.5.4 to 0.5.5

12

lib/serializer.js

@@ -204,2 +204,8 @@ 'use strict';

_.each(schema.secondaryIndexes, function (rangeKey) {
if(hashKey[rangeKey]){
obj[rangeKey] = hashKey[rangeKey];
}
});
} else {

@@ -303,3 +309,9 @@ obj[schema.hashKey] = hashKey;

_.each(schema.secondaryIndexes, function (rangekey) {
if(item[rangekey]){
result[rangekey] = internals.deserializeAttribute(item[rangekey], schema.attrs[rangekey]);
}
});
return result;
};

2

package.json
{
"name": "vogels",
"version": "0.5.4",
"version": "0.5.5",
"author": "Ryan Fitzgerald <ryan@codebrewstudios.com>",

@@ -5,0 +5,0 @@ "description": "DynamoDB data mapper",

@@ -73,2 +73,13 @@ 'use strict';

it('should handle local secondary index keys', function () {
schema.String('email', {hashKey: true});
schema.Number('age', {rangeKey: true});
schema.String('name', { secondaryIndex: true });
var data = { email : 'test@example.com', age: 22, name: 'Foo Bar' };
var keys = serializer.buildKey(data, null, schema);
keys.should.eql({email: {S: 'test@example.com'}, age: {N : '22'}, name: {S: 'Foo Bar'}});
});
it('should handle global secondary index keys', function () {

@@ -89,2 +100,3 @@ schema.String('email', {hashKey: true});

});
});

@@ -114,4 +126,15 @@

it('should global secondary index keys', function () {
it('should deserialize local secondary index keys', function () {
schema.String('email', {hashKey: true});
schema.Number('age', {rangeKey: true});
schema.String('name', { secondaryIndex: true });
var serializedItem = {email : {S : 'test@example.com'}, age : {N : '22'}, name : {S: 'Foo Bar'}};
var keys = serializer.deserializeKeys(schema, serializedItem);
keys.should.eql({email: 'test@example.com', age: 22, name: 'Foo Bar'});
});
it('should deserialize global secondary index keys', function () {
schema.String('email', {hashKey: true});
schema.Number('age');

@@ -118,0 +141,0 @@ schema.String('name');

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