# lambda-simple-response

> simple response for lambda with logging

Latest version **0.0.1** (published 2017-02-07) · MIT license · 0 weekly downloads

## Install

```sh
npm install lambda-simple-response
pnpm add lambda-simple-response
yarn add lambda-simple-response
bun add lambda-simple-response
```

## 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-02-07 |
| First published | 2017-02-07 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=4.3 |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 3 |
| Author | Jaesang Yoo |
| Maintainers | jaesangyoo |
| Keywords | lambda, aws-lambda, response, simple-response, utility, aws |

## Links

- npm: https://www.npmjs.com/package/lambda-simple-response
- Repository: https://github.com/classtinginc/lambda-simple-response
- Homepage: https://github.com/classtinginc/lambda-simple-response#readme
- Issues: https://github.com/classtinginc/lambda-simple-response/issues
- npm.io page: https://npm.io/package/lambda-simple-response

## Alternatives

- [@opentelemetry/exporter-zipkin](https://npm.io/package/@opentelemetry/exporter-zipkin.md) — 14.8M weekly downloads
- [pusher-js](https://npm.io/package/pusher-js.md) — 2.0M weekly downloads
- [browserify](https://npm.io/package/browserify.md) — 1.7M weekly downloads
- [sqs-consumer](https://npm.io/package/sqs-consumer.md) — 1.7M weekly downloads
- [@sanity/eventsource](https://npm.io/package/@sanity/eventsource.md) — 930.8K weekly downloads

## Recent versions

- 0.0.1 (latest) — 2017-02-07

## README

# lambda-simple-response
Very simple response with logging for lambda.

Basically, lambda-simple-response leaves log and invoke callback function passed in.

To stop lambda process as soon as you call lambda-simple-response,
set callbackWaitsForEmptyEventLoop of context as true(false by default)

## Install
```sh
$ npm install --save lambda-simple-response
```

## Usage

```js
const response = require('lambda-simple-response');

module.exports.handler = (event, context, callback) => {
  context.callbackWaitsForEmptyEventLoop = false;
  
  let result = {
    'message': 'success'
  };
  let err = {
    'message': 'error'
  };
  
  if (err) response.error(err, "Error JSON:", callback);
  else response.success(result, "handler:", "success", callback);
};
```

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