# @honestdoor/lambda-utils

> > TODO: description

Latest version **0.2.4** (published 2021-10-05) · ISC license · 0 weekly downloads

## Install

```sh
npm install @honestdoor/lambda-utils
pnpm add @honestdoor/lambda-utils
yarn add @honestdoor/lambda-utils
bun add @honestdoor/lambda-utils
```

## Health

**Score 25/100 (F)** — status: abandoned.

Positive: has types; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.2.4 |
| Published | 2021-10-05 |
| First published | 2021-10-04 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 15.6 KB |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| Author | Barend Du Toit |
| Maintainers | honestdoor |

## Links

- npm: https://www.npmjs.com/package/@honestdoor/lambda-utils
- Repository: https://github.com/honestdoor-inc/honestdoor
- Homepage: https://github.com/honestdoor-inc/honestdoor#readme
- Issues: https://github.com/honestdoor-inc/honestdoor/issues
- npm.io page: https://npm.io/package/@honestdoor/lambda-utils

## Dependencies (2)

- [aws-sdk](https://npm.io/package/aws-sdk.md) ^2.1000.0
- [deepmerge](https://npm.io/package/deepmerge.md) ^4.2.2

## Recent versions

- 0.2.4 (latest) — 2021-10-05
- 0.2.3 — 2021-10-05
- 0.2.2 — 2021-10-05
- 0.2.1 — 2021-10-05
- 0.2.0 — 2021-10-05
- 0.1.0 — 2021-10-05
- 0.0.4 — 2021-10-04
- 0.0.3 — 2021-10-04
- 0.0.2 — 2021-10-04
- 0.0.1 — 2021-10-04
- 0.0.0 — 2021-10-04

## README

# `@honestdoor/lambda-utils`

Collection of helpful utilities around working with lambda functions

## Response Builder

The `Responder` is meant to make api gateway responses easier to write and manage
#### Example Usage:

```js
import { Responder } from '@honestdoor/lambda-utils'

const res = new Responder({
    // Default response variables
    headers: {
        "Access-Control-Allow-Origin": "locahost:3000"
    },
    statusCode: 400
})

...

const response =  res.status(200).json({ success: true })

...

console.log(response)

```

#### Output:
```json
{
  "headers": {
     "Access-Control-Allow-Origin": "locahost:3000"
  },
  "statusCode": 200,
  "body": "{ success: true }"
}
```
**Error Example:** 
```js
res.status(400).error("Something went terribly wrong!")
```

---
_Source: https://npm.io/package/@honestdoor/lambda-utils · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
