0.0.8 • Published 7 years ago

lambda-node-utility v0.0.8

Weekly downloads
-
License
ISC
Repository
-
Last release
7 years ago

lambda-utils

A utility library for Lambda and Node.js development.

This will be a growing collection of helper methods I encounter while using the serverless stack.

Methods

convertAWSObjectToFlatObject

This converts a DynamoDb image passed through an event to a flat object that we can use to send to other services

input: { name: { S: "Lambda" } }

output: { name: "Lambda" }

convertObjectToLowerCaseKeys

This converts an object to lowercase keys so we can update services like Amazon CloudSearch

input: { Name: "Lambda" }

output: { name: "Lambda" }

generateDynamoUpdateExpr

This converts an object into an update expression for updating dynamo db. You can also pass in a list of columns to exclude from the update, for example hash or range keys.

input: { name: { S: "Lambda" } }

output: { UpdateExpression: "set name = :a1", ExpressionAttributeValues: { ":a1": "Lambda" }, Count: 1 }

0.0.8

7 years ago

0.0.7

8 years ago

0.0.6

8 years ago

0.0.5

8 years ago

0.0.4

8 years ago

0.0.3

8 years ago