# api-gateway-util

> Utility for API Gateway

Latest version **0.0.6** (published 2018-06-20) · MIT license · 0 weekly downloads

## Install

```sh
npm install api-gateway-util
pnpm add api-gateway-util
yarn add api-gateway-util
bun add api-gateway-util
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 0.0.6 |
| Published | 2018-06-20 |
| First published | 2017-06-22 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 6.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Kengo Nakatsuka |
| Maintainers | nak2k |
| Keywords | aws, api-gateway |

## Links

- npm: https://www.npmjs.com/package/api-gateway-util
- Repository: https://github.com/nak2k/node-api-gateway-util
- Issues: https://github.com/nak2k/node-api-gateway-util/issues
- npm.io page: https://npm.io/package/api-gateway-util

## 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.6 (latest) — 2018-06-20
- 0.0.5 — 2018-06-19
- 0.0.4 — 2017-08-05
- 0.0.3 — 2017-07-12
- 0.0.2 — 2017-06-28
- 0.0.1 — 2017-06-22

## README

# api-gateway-util

Utility for API Gateway.

## Installation

```
npm i api-gateway-util -S
```

## matchBy(resources, options, callback = Array)

This function finds a resource that match by the argument `options` from `resources`.

### arguments

- `resources`
    - An array of resources are returned by `getResources` of [APIGateway](http://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/APIGateway.html).
- `options.path`
    - A path of the resource to find.
- `options.method`
    - A method that the resource to find has.
- `callback(err, result)`
    - A function called when the search is completed or an error occurs.
    - `err`
        - An error object when an error occurs.
        - When successful, `null` passed into this argument.
    - `result`
        - An object of a resource matched by path.
        - If not matched, `null` passed into this argument.

### returning value

If `callback` is omitted, this function returns the following array.

``` javascript
[err, result]
```

For the definition of `err` and `result`, see the description of `callback`.

## License

MIT

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