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

dynamite

Package Overview
Dependencies
Maintainers
17
Versions
54
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

dynamite - npm Package Compare versions

Comparing version 0.7.3 to 0.7.4

6

lib/ConditionBuilder.js

@@ -60,7 +60,7 @@ var typ = require('typ')

case 'IN':
return function(item) { return values.indexOf(item[key]) }
return function(item) { return values.indexOf(item[key]) != -1 }
case 'NOT_CONTAINS':
return function(item) { return !item[key].indexOf(values[0]) }
return function(item) { return item[key].indexOf(values[0]) == -1 }
case 'CONTAINS':
return function(item) { return item[key].indexOf(values[0]) }
return function(item) { return item[key].indexOf(values[0]) != -1 }
case 'NULL':

@@ -67,0 +67,0 @@ return function(item) { return !item.hasOwnProperty(key) }

@@ -28,2 +28,4 @@ // Copyright 2013 The Obvious Corporation

* BS: (Array.<string>|undefined),
* M: (Object|undefined),
* L: (Array|undefined),
* N: (string|undefined),

@@ -143,3 +145,3 @@ * NS: (Array.<string>|undefined),

* @param {!AWSAttributeValue} obj
* @return {string|number|Array.<string>|Array.<number>|boolean} a javascript primitive value
* @return {string|number|Array.<string>|Array.<number>|boolean|Object} a javascript primitive value
*/

@@ -146,0 +148,0 @@ function objectToValue(obj) {

{
"name": "dynamite",
"description": "promise-based DynamoDB client",
"version": "0.7.3",
"version": "0.7.4",
"homepage": "https://github.com/Medium/dynamite",

@@ -6,0 +6,0 @@ "license": "Apache-2.0",

@@ -723,1 +723,25 @@ // Copyright 2013 The Obvious Corporation

})
builder.add(function testQueryFilterIn(test) {
db.getTable('user').setData({
'userA': {
1: {userId: 'userA', column: '1', age: 27, name: 'Ringo'},
2: {userId: 'userA', column: '4', age: 28, name: 'George'},
3: {userId: 'userA', column: '3', age: 29, name: 'Paul'},
4: {userId: 'userA', column: '2', age: 30}
}
})
var filter = client.newConditionBuilder()
.filterAttributeIn('name', ['Ringo', 'George'])
return client.newQueryBuilder('user')
.setHashKey('userId', 'userA')
.withFilter(filter)
.execute()
.then(function (data) {
test.deepEqual(['George', 'Ringo'], data.result.map(function (r) {
return r.name
}).sort())
})
})
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