yarn add dynamo-merge # or npm install dynamo-merge --save
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.
To run tests, use
yarn test # or npm test
MIT