# @repit/q

> A better way to write AWS Lambda functions.

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

## Install

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

## 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.2 |
| Published | 2017-12-25 |
| First published | 2017-12-24 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Ion Suman |
| Maintainers | sumanion |

## Links

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

## Recent versions

- 0.0.2 (latest) — 2017-12-25
- 0.0.1 — 2017-12-24

## README

# Repit Q

A better way to write AWS Lambda functions.

## Installation

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

## Usage

```js
'use strict'

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

// Define a basic middleware.
q((req, res) => {
  // Do something and stop.
})

// Define a basic middleware.
q((req, res, next) => {
  // Do something and continue.
  next()
})

// Define a middleware which sends an error.
q((req, res, next) => {
  // Do something and send an error to error handlers.
  next(new Error('Something went wrong.'))
})

// Define an error handler middleware.
q((err, req, res, next) => {
  // Do something with the error and continue.
  next()
})

// Define an error handler middleware.
q((err, req, res, next) => {
  // Do something with the error and stop.
})

exports.handler = q.handler
```

## License

MIT

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