Socket
Socket
Sign inDemoInstall

@tractorzoom/dynamo-utils

Package Overview
Dependencies
0
Maintainers
1
Versions
301
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @tractorzoom/dynamo-utils

Wrapper around the JS Dynamo Doc Client implementing standardized error handling and other utilities


Version published
Maintainers
1
Created

Readme

Source

@tractorzoom/dynamo-utils

Commitizen friendly jest Prettier Renovate enabled semantic-release

Available Methods

Method: docClient(method, params)
parametertypedescription
methodstringany valid dynamo document client method
paramsobjectobject params accepted by the corresponding dynamo document client method

How do I use? :thinking:

Installation:
npm i @tractorzoom/dynamo-utils
Usage:
import { docClient } from '@tractorzoom/dynamo-utils';

export const putHandler = async () => {
    const params = {
        Table: 'MyTable',
        Item: { key: 'super awesome item' },
    };

    const response = await docClient('put', params);

    if (response.error) {
        return internalServerError(response.error);
    }

    return ok(response);
};

Keywords

FAQs

Last updated on 15 Aug 2022

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc