1.0.2 • Published 3 years ago

@distinction-dev/dynamo-unmarshall v1.0.2

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

Middy DynamoDB Unmarshall

Why?

Taking inspiration from Json Body Parser, we decided to export this simple middleware we built

Install

To install this middleware you can use NPM:

npm install --save @distinction-dev/dynamo-unmarshall

Sample usage

const middy = require('@middy/core');
const dynamoUnmarshall = require('@middy/error-logger');

const handler = middy((event, context) => {
  // your handler logic
})

handler
  .use(dynamoUnmarshall())

Options

  • aws property: The instance of the aws-sdk, If none is provided then it will simply import it.

  • imageTypes property: An array providing which image types to convert can only contain "NewImage", "OldImage".

  • converterOptions property: The options that you wanna pass to the DynamoDB converter.

License

Licensed under MIT License.