JSPM

aws-converter

0.0.3
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 7
  • Score
    100M100P100Q51142F
  • License Apache-2.0

The AWS converter to be used with lambda

Package Exports

  • aws-converter

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 (aws-converter) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

aws-converter

This module provides the AWS converter which appeared in AWS 2.71.0. Since Lambda receive 2.54.0, you can't easily unmarshall records returned by dynamodb stream.

This Library have been created to resolve this issue without having to manually add AWS-SDK within your bundle.

Usage

import { marshall, unmarshall } from "aws-converter"


marshall({
  baz: { S: "foo bar" },
  fooz: {
    L: [
      {
        S: "foo",
      },
      {
        N: "32.23",
      },
    ],
  },
})
// {baz: "foo bar", fooz: ["foo", 32.23]}

unmarshall({bar: { N: "32.23" }})
// {bar: 32.23}

Test

Tests run under jest

yarn test