Skip to content

chentsulin/koa-snake-res

Repository files navigation

koa-snake-res

NPM version Build Status Quality Test coverage Dependency Status

Snake case json response transform middleware for koa

Install

$ npm install koa-snake-res

Usage

var koa = require('koa')
var app = koa()
var snakeRes = require('koa-snake-res')

app.use(snakeRes())

app.use(function *() {
  this.body = {
    camelCase: 'this is a camelCase'
  }
})

app.listen()

// GET /
//
// {
//    camel_case: 'this is a camelCase'
// }

License

MIT © C. T. Lin

About

Snake case json response transform middleware for koa

Resources

License

Stars

Watchers

Forks

Packages

No packages published