@ydv/function

2.0.3 • Public • Published

@ydv/function

npm install --save @ydv/function

Creates a wrapper around a Lambda handler.

  1. Enables promise support. Return a value from the handler, and it's assumed to be 200 OK JSON.
  2. Sane error handling. Any error object will be passed as response body with error.statusCode || 500.
  3. Logging on error, adds logger to context
  4. Calls options.runBefore(event, context) before running handler
  5. Automatically parses incoming event.body to object and event.query to object (if applicable)

Readme

Keywords

none

Package Sidebar

Install

npm i @ydv/function

Weekly Downloads

14

Version

2.0.3

License

none

Unpacked Size

6.41 kB

Total Files

6

Last publish

Collaborators

  • bdbuyertech
  • ydvdev
  • skag