# hapi-shaper

> A simple plugin to generate consistent json response using hapi.js

Latest version **1.0.0** (published 2020-02-11) · ISC license · 0 weekly downloads

## Install

```sh
npm install hapi-shaper
pnpm add hapi-shaper
yarn add hapi-shaper
bun add hapi-shaper
```

## 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.0.0 |
| Published | 2020-02-11 |
| First published | 2020-02-11 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 1.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Rico Chen |
| Maintainers | midnightcodr |

## Links

- npm: https://www.npmjs.com/package/hapi-shaper
- npm.io page: https://npm.io/package/hapi-shaper

## Recent versions

- 1.0.0 (latest) — 2020-02-11

## README

### About
This is a simple plugin to generate consistent json response using hapi.js.

### Usage Example
```javascript
const Hapi = require('@hapi/hapi')
const server = Hapi.server({
  port: 3000
})

server.route({
  method: 'GET',
  path: '/test',
  handler (request, h) {
    return h.success(
      {
        what: 'ever'
      },
      201
    )
  }
})
;(async () => {
  await server.register({
    plugin: require('hapi-shaper')
  })
  await server.start()
  console.log(`server running at ${server.info.uri}`)
})()

```

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