JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 2
  • Score
    100M100P100Q32036F
  • License ISC

AWS DynamoDB store and query functions simplified

Package Exports

  • simple-dynamo-utils
  • simple-dynamo-utils/src/index.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (simple-dynamo-utils) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

simple-dynamo-utils

This library includes simplified AWS DynamoDb functions.

Install

Just install the module with npm

npm install simple-dynamo-utils

Example

update function parameters

import { generateUpdateParams } from 'simple-dynamo-utils'

const item = {
    'property1': 'value1',
    'property2': 'value2',
    'property3': 'value3'
}

const table = 'table_name'

const params = generateUpdateParams({
    tableName: table,
    item: item
})

console.log(params);

output

{
  TableName: 'table_name',
  ExpressionAttributeNames: { '#F0': 'property1', '#F1': 'property2', '#F2': 'property3' },
  ExpressionAttributeValues: { ':val0': 'value1', ':val1': 'value2', ':val2': 'value3' },
  UpdateExpression: 'SET #F0 = :val0, #F1 = :val1, #F2 = :val2'
}

Functions

  • Generate Parameters for the scan, update, query function with filter expressions