@tinyhttp/jsonp

npm (scoped) npm

JSONP middleware module.

Install

pnpm i @tinyhttp/jsonp

Example

import { App } from '@tinyhttp/app'
import { jsonp } from '@tinyhttp/jsonp'

const app = new App()

app.use((req, res, next) => {
  res.jsonp = jsonp(req, res, app)
  next()
})

app.get('/', (req, res) => {
  res.jsonp({ some: 'jsonp' })
})

app.listen(3000)

License

MIT © v1rtl

Install

pnpm i @tinyhttp/jsonp

Version

0.5.35

Source

packages/etag