# numo-provider-boilerplate

> Boilerplate for numo providers

Latest version **0.0.2** (published 2016-08-17) · 0 weekly downloads

## Install

```sh
npm install numo-provider-boilerplate
pnpm add numo-provider-boilerplate
yarn add numo-provider-boilerplate
bun add numo-provider-boilerplate
```

## 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 | 2016-08-17 |
| First published | 2016-08-17 |
| Weekly downloads | 0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | lennym |

## Links

- npm: https://www.npmjs.com/package/numo-provider-boilerplate
- Repository: https://github.com/numo-labs/provider-boilerplate
- Homepage: https://github.com/numo-labs/provider-boilerplate#readme
- Issues: https://github.com/numo-labs/provider-boilerplate/issues
- npm.io page: https://npm.io/package/numo-provider-boilerplate

## Dependencies (1)

- [mintsauce](https://npm.io/package/mintsauce.md) 0.0.7

## Recent versions

- 0.0.2 (latest) — 2016-08-17
- 0.0.1 — 2016-08-17
- 0.0.0 — 2016-08-17

## README

# provider-boilerplate

## Common aspects of providers

The implementation details of the below may vary from provider to provider. Some providers may not perform some steps.

* Receive query event from SNS
* Turn query into a list of possible candidate ids
* Apply weighting to candidate ids
* Iterate over candidate ids to populate full data - usually by querying an external service [\[1\]](#notes)
* Filter/transform/reduce returned data into a form for consumption by client
* Publish full results over a result stream - this may be one at a time, it may be batched, depending on the provider [\[1\]](#notes)
* Emit a completion event when no further results are expected.

### Notes

\[1\] Generally a provider which performs a lookup on iteration over the preliminary result set will send results one at a time for speed. Something like an autocomplete provider, which (should probably) perform no such iteration would send all results as a single event.

## Additional concerns

* Debugging/logging - possibly want to have common logging messages/formats across providers linked to the steps above.

## Proposal

Module will return a middleware pipeline, which can have custom methods inserted into points on the pipeline corresponding to the steps above. Where particular steps are common then reasonable defaults are applied.

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