npm

@tinyhttp/jsonp
TypeScript icon, indicating that this package has built-in type declarations

2.1.12 • Public • Published

@tinyhttp/jsonp

npm (scoped) npm

JSONP response extension.

Install

pnpm i @tinyhttp/jsonp

Example

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

new App({
  applyExtensions: (req, res) => {
    extendMiddleware(req, res)
    json(req, res)
  }
})
  .get('/', (req, res) => res.jsonp({ some: 'jsonp' }))
  .listen(3000)

Package Sidebar

Install

npm i @tinyhttp/jsonp

Weekly Downloads

9

Version

2.1.12

License

MIT

Unpacked Size

30.7 kB

Total Files

8

Last publish

Collaborators

  • dropthebeatbro