@nutshelllab/dynamodb-table
TypeScript icon, indicating that this package has built-in type declarations

0.0.12 • Public • Published

dynamodb-table

Build Status npm bundle size Maintainability

Just sugar syntax over AWS DynamoDB

⚠️ Work in progress, not published yet.

Install

yarn add @nutshelllab/dynamodb-table

Usage

Single primary key

import Table from '@nutshelllab/dynamodb-table'

const usersStore = new Table('users')

(async ({ id, ...data }) => {
  const users = await usersStore.put({
    key: { id },
    data
  })
})

Combined primary key

import Table from '@nutshelllab/dynamodb-table'

const postsStore = new Table('users_posts')

(async ({ userId, id, ...data }) => {
  const users = await usersStore.put({
    key: { userId, id },
    data
  })
})

API

method(arg1, arg2)

arg1

Type: string

Arg1 description

arg2

Type: Object

Arg2 description

License

MIT © Nutshell

Dependents (0)

Package Sidebar

Install

npm i @nutshelllab/dynamodb-table

Weekly Downloads

0

Version

0.0.12

License

MIT

Unpacked Size

11.7 kB

Total Files

10

Last publish

Collaborators

  • bluer4v3n
  • 7hanith
  • vblitz