json-api-adapter

0.3.0 • Public • Published

json-api-adapter

A library for constructing JSON-API compliant responses

Installation

npm install json-api-adapter --save

Usage

const JSONAPIAdapter = require('json-api-adapter')
// post is data return from Monoose
const postData = new JSONAdpter(post).getResponse()
// response send from express
res.json(postData);

Tests

npm test

Contributing

In lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code.

Release History

  • 0.0.1 Initial release

Package Sidebar

Install

npm i json-api-adapter

Weekly Downloads

1

Version

0.3.0

License

MIT

Last publish

Collaborators

  • taojs