@mac-/dynamo-merge

Painlessly update nested DynamoDB objects.

Usage no npm install needed!

<script type="module">
  import macDynamoMerge from 'https://cdn.skypack.dev/@mac-/dynamo-merge';
</script>

README

dynamo-merge

Greenkeeper badge Build Status NPM Version Codacy Badge

Installation

yarn add dynamo-merge # or npm install dynamo-merge --save

Usage

import merge from "dynamo-merge"

const result = await documentClient.update({
    TableName: "users",
    Key: {email},
    ...merge(updatedUserAttributes),
})

Look at test.js for example use cases and the expected output.

Tests

To run tests, use

yarn test # or npm test

License

MIT