# @distinction-dev/dynamo-unmarshall

> Middy middleware to unmarshall records from DynamoDB Stream events

Latest version **1.0.2** (published 2021-08-10) · MIT license · 0 weekly downloads

## Install

```sh
npm install @distinction-dev/dynamo-unmarshall
pnpm add @distinction-dev/dynamo-unmarshall
yarn add @distinction-dev/dynamo-unmarshall
bun add @distinction-dev/dynamo-unmarshall
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.2 |
| Published | 2021-08-10 |
| First published | 2021-08-10 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 8.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Maintainers | killdozerx2 |
| Keywords | Middy, aws, lambda, dynamodb |

## Links

- npm: https://www.npmjs.com/package/@distinction-dev/dynamo-unmarshall
- Repository: https://github.com/distinction-dev/dynamo-unmarshall
- Homepage: https://github.com/distinction-dev/dynamo-unmarshall#readme
- Issues: https://github.com/distinction-dev/dynamo-unmarshall/issues
- npm.io page: https://npm.io/package/@distinction-dev/dynamo-unmarshall

## Alternatives

- [@opentelemetry/exporter-zipkin](https://npm.io/package/@opentelemetry/exporter-zipkin.md) — 14.8M weekly downloads
- [pusher-js](https://npm.io/package/pusher-js.md) — 2.0M weekly downloads
- [browserify](https://npm.io/package/browserify.md) — 1.7M weekly downloads
- [sqs-consumer](https://npm.io/package/sqs-consumer.md) — 1.7M weekly downloads
- [@sanity/eventsource](https://npm.io/package/@sanity/eventsource.md) — 930.8K weekly downloads

## Recent versions

- 1.0.2 (latest) — 2021-08-10
- 1.0.1 — 2021-08-10

## README

# Middy DynamoDB Unmarshall

<div align="center">
  <img alt="Middy logo" src="https://raw.githubusercontent.com/middyjs/middy/main/docs/img/middy-logo.png"/>
</div>

<div align="center">
  <p><strong>
    Dynamo DB Stream event data parser for the middy framework, like json body parser but for dynamodb stream events
  </strong></p>
</div>
Simply uses AWS sdk's DynamoDB Document Client Converter to  convert the data received in the New/Old Image of all records to plain json.

## 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:

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

## Sample usage

```javascript
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](LICENSE).

---
_Source: https://npm.io/package/@distinction-dev/dynamo-unmarshall · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
