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

node-aws-utils

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

node-aws-utils - npm Package Compare versions

Comparing version 1.7.0 to 2.0.0

8

lib/index.d.ts

@@ -6,3 +6,9 @@ import type { TResultAsync } from 'node-result';

fields?: string[];
}): TResultAsync<DynamoDB.DocumentClient.AttributeMap | null, Error>;
fieldsMap?: DynamoDB.DocumentClient.ExpressionAttributeNameMap;
consistent?: boolean;
capacity?: DynamoDB.DocumentClient.ReturnConsumedCapacity;
}): TResultAsync<{
item: DynamoDB.DocumentClient.AttributeMap | null;
capacity: DynamoDB.DocumentClient.ConsumedCapacity | null;
}, Error>;
static getFromIndex(client: DynamoDB.DocumentClient, tableName: DynamoDB.DocumentClient.TableName, indexName: DynamoDB.DocumentClient.IndexName, where: {

@@ -9,0 +15,0 @@ pk: {

10

lib/index.js

@@ -19,4 +19,10 @@ "use strict";

params.ProjectionExpression = options.fields.join(',');
const { Item } = await client.get(params).promise();
return node_result_1.ok(Item || null);
if (options.fieldsMap)
params.ExpressionAttributeNames = options.fieldsMap;
if (options.consistent)
params.ConsistentRead = options.consistent;
if (options.capacity)
params.ReturnConsumedCapacity = options.capacity;
const { Item, ConsumedCapacity } = await client.get(params).promise();
return node_result_1.ok({ item: Item || null, capacity: ConsumedCapacity || null });
}

@@ -23,0 +29,0 @@ static async getFromIndex(client, tableName, indexName, where) {

{
"name": "node-aws-utils",
"version": "1.7.0",
"version": "2.0.0",
"description": "aws utils",

@@ -5,0 +5,0 @@ "keywords": [

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