# @repit/q-send

> R/Q Middleware to simplify AWS Lambda responses.

Latest version **0.0.1** (published 2017-12-25) · MIT license · 0 weekly downloads

## Install

```sh
npm install @repit/q-send
pnpm add @repit/q-send
yarn add @repit/q-send
bun add @repit/q-send
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.1 |
| Published | 2017-12-25 |
| First published | 2017-12-25 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Ion Suman |
| Maintainers | sumanion |

## Links

- npm: https://www.npmjs.com/package/@repit/q-send
- npm.io page: https://npm.io/package/@repit/q-send

## Dependencies (1)

- [@repit/lambda-send](https://npm.io/package/@repit/lambda-send.md) ^2.0.1

## Recent versions

- 0.0.1 (latest) — 2017-12-25

## README

# Repit Q-Send

R/Q Middleware to simplify AWS Lambda responses.

## About

This module is a wrapper for [@repit/lambda-send](https://www.npmjs.com/package/@repit/lambda-send).

## Installation

```bash
$ npm install @repit/q-send --save
```

## Usage

```js
'use strict'

const q = require('@repit/q')()
const send = require('@repit/q-send')

q(send())

q((req, res) => {
  // Set the HTTP status code of the response.
  res.code(statusCode)

  // Enable / Disable CORS.
  res.cors(enabled) // Default: true.

  // Set custom headers of the response.
  res.headers({})

  // Set custom response body fields.
  res.body({})

  // Send the response.
  res.send(payload)
})

exports.handler = q.handler
```

## License

MIT

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