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

@xapp/dynamo-service

Package Overview
Dependencies
Maintainers
5
Versions
155
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@xapp/dynamo-service - npm Package Compare versions

Comparing version 0.0.96 to 0.0.97

xapp-dynamo-service-0.0.96.tgz

1

dist/service/TableService.d.ts

@@ -49,2 +49,3 @@ import { ConditionExpression, DynamoService, QueryParams, QueryResult, ScanParams, ScanResult, UpdateBody, UpdateReturnType } from "./DynamoService";

delete(key: Partial<T> | Partial<T>[]): Promise<void>;
private getKey(obj);
private cleanseObjectOfIgnoredGetItems(obj);

@@ -51,0 +52,0 @@ private cleanseObjectOfIgnoredGetItems<P>(obj);

16

dist/service/TableService.js

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

ensureFormat(this.formattedKeys, set);
const dynamoKey = this.convertObjToDynamo(key);
const dynamoKey = this.getKey(key);
return this.db

@@ -143,4 +143,4 @@ .update(this.tableName, dynamoKey, { set, remove, append }, conditionExpression, returnType)

const realKey = (Array.isArray(key)) ?
key.map(key => this.convertObjToDynamo(key)) :
this.convertObjToDynamo(key);
key.map(key => this.getKey(key)) :
this.getKey(key);
return this.db.get(this.tableName, realKey, projection)

@@ -162,5 +162,13 @@ .then(item => (Array.isArray(item)) ? item.map((item) => this.convertObjFromDynamo(item)) : this.convertObjFromDynamo(item))

delete(key) {
const dynamoKey = Array.isArray(key) ? key.map(k => this.convertObjToDynamo(k)) : this.convertObjToDynamo(key);
const dynamoKey = Array.isArray(key) ? key.map(k => this.getKey(k)) : this.getKey(key);
return this.db.delete(this.tableName, dynamoKey);
}
getKey(obj) {
const key = {};
key[this.primaryKey] = obj[this.primaryKey];
if (this.sortKey) {
key[this.sortKey] = obj[this.sortKey];
}
return this.convertObjToDynamo(key);
}
cleanseObjectOfIgnoredGetItems(obj) {

@@ -167,0 +175,0 @@ if (!obj || !this.props.ignoreColumnsInGet) {

{
"name": "@xapp/dynamo-service",
"version": "0.0.96",
"version": "0.0.97",
"description": "A dynamo help class which will help maintain data integrity.",

@@ -5,0 +5,0 @@ "main": "dist/index.js",

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