JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 13
  • Score
    100M100P100Q44668F
  • License MIT

Snake case json response transform middleware for koa

Package Exports

  • koa-snake-res

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (koa-snake-res) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

koa-snake-res

NPM version Build Status Test coverage

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