genie-lambda-toolbelt

Toolbelt for creating Lambda functions

Usage no npm install needed!

<script type="module">
  import genieLambdaToolbelt from 'https://cdn.skypack.dev/genie-lambda-toolbelt';
</script>

README

Genie Lambda Toolbelt

Set of reusable tools to make writing new Lambda functions a breeze.

Sample Usage

import { compose, httpHandler, withJSONBody } from 'genie-lambda-toolbelt';

const myHelloWorldFunction = async (event: IHTTPEvent, context: IHTTPContext): Promise<object> => {
  const { genie: { body } } = context;
  return {
    message: `Hello, ${body.name}`,
  };
};

export default compose(httpHandler, withJSONBody)(myHelloWorldFunction);