@random-guys/express-jsend
TypeScript icon, indicating that this package has built-in type declarations

0.1.0 • Public • Published

express-jsend

Integration of jsend and express

How to install?

yarn add @random-guys/express-jsend

How does it work?

app.get('/success', async (_req, res) => {
  res.jSend.success({ result: 0 })
})

app.get('/error', (_req, res) => {
  // @ts-ignore 
  res.jSend.error({ field: 'name' }, 'This fields are required', 422)
})

Readme

Keywords

none

Package Sidebar

Install

npm i @random-guys/express-jsend

Weekly Downloads

0

Version

0.1.0

License

MIT

Unpacked Size

174 kB

Total Files

17

Last publish

Collaborators

  • random-guys