# uh-responder

> Urbanhire API helper for give json response success or error

Latest version **3.1.0** (published 2018-01-21) · MIT license · 0 weekly downloads

## Install

```sh
npm install uh-responder
pnpm add uh-responder
yarn add uh-responder
bun add uh-responder
```

## 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 | 3.1.0 |
| Published | 2018-01-21 |
| First published | 2016-04-04 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 6 |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| Author | Urbanhire.com |
| Maintainers | hengkiardo, uh-engineer |

## Links

- npm: https://www.npmjs.com/package/uh-responder
- Repository: https://github.com/urbanhire/uh-responder
- Homepage: https://github.com/urbanhire/uh-responder#readme
- Issues: https://github.com/urbanhire/uh-responder/issues
- npm.io page: https://npm.io/package/uh-responder

## Dependencies (6)

- [uuid](https://npm.io/package/uuid.md) ^3.2.1
- [is-empty](https://npm.io/package/is-empty.md) ^1.2.0
- [is-object](https://npm.io/package/is-object.md) ^1.0.1
- [lodash.join](https://npm.io/package/lodash.join.md) ^4.0.1
- [lodash.isnan](https://npm.io/package/lodash.isnan.md) ^3.0.2
- [lodash.result](https://npm.io/package/lodash.result.md) ^4.5.2

## Recent versions

- 3.1.0 (latest) — 2018-01-21
- 3.0.0 — 2018-01-21
- 2.2.0 — 2017-02-21
- 2.1.0 — 2017-02-21
- 2.0.1 — 2017-02-01
- 2.0.0 — 2017-02-01
- 1.0.5 — 2016-05-06
- 1.0.3 — 2016-05-04
- 1.0.2 — 2016-04-04
- 1.0.1 — 2016-04-04
- 1.0.0 — 2016-04-04

## README

# uh-responder
Urbanhire API helper for give json response success or error

### Usage

```javascript
const uhResonseder = require('uh-responder')
app.use(uhResonseder())

// example response json output
const output = {
  users,
  companies
}

res.UHJson(output, extraData)


// example output with extraData fields

const output = {
  users,
  companies
}

const extraData = {
  success: true
}

res.UHJson(output, extraData)


// example error response api

res.jsonError(new Error('Applicant Id is required'), 400)

```



This project uses [JavaScript Standard Style](https://github.com/feross/standard) - if the name or style choices bother you,
you're gonna have to get over it :)

[![js-standard-style](https://cdn.rawgit.com/feross/standard/master/badge.svg)](https://github.com/feross/standard)

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