# n3h-action-builder

> Help build action messager.

Latest version **1.1.0** (published 2018-03-26) · MIT license · 0 weekly downloads

## Install

```sh
npm install n3h-action-builder
pnpm add n3h-action-builder
yarn add n3h-action-builder
bun add n3h-action-builder
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.1.0 |
| Published | 2018-03-26 |
| First published | 2018-03-25 |
| 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 | zhaoyao91 |
| Maintainers | zhaoyao91 |
| Keywords | n3h, action-builder |

## Links

- npm: https://www.npmjs.com/package/n3h-action-builder
- Repository: https://github.com/zhaoyao91/n3h
- Homepage: https://github.com/zhaoyao91/n3h#readme
- Issues: https://github.com/zhaoyao91/n3h/issues
- npm.io page: https://npm.io/package/n3h-action-builder

## Recent versions

- 1.1.0 (latest) — 2018-03-26
- 1.0.0 — 2018-03-25

## README

# N3H Action Builder

Help build action messager.

## Conventions for Action

- each action has such a full name: `action.$serviceName.$actionName`
- the topic of its full name trigger the action
- each action uses its full name as queue group name
- action could return any result
- action could emit side effect messages with the topic pattern `$fullName.$case`

## API

### buildAction

```
(Options) => Void

Options ~ {
  natsEx: NatsEx,
  serviceName?: String,
  actionName: String,
  validator?: (data) => data,
  handler: Handler
}

Handler ~ (data, message, receivedTopic): HandlerThis => Promise => Any

HandlerThis ~ {
  emit: (case, data?) => messageId
}
```

## License

MIT

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