koa-polyfill

1.0.1 • Public • Published

koa-polyfill

Middleware that provides a self-hosted version of polyfill.io

use

const _ = require('koa-route')
const { getPolyfill } = require('koa-polyfill')
const Koa = require('koa')
const app = new Koa()
app.use(_.get("/polyfill/v3/polyfill.(min.)?js", async (ctx) => {
  await getPolyfill(ctx)
})

See index.js in this repo for a more complete example.

Readme

Keywords

none

Package Sidebar

Install

npm i koa-polyfill

Weekly Downloads

0

Version

1.0.1

License

MIT

Unpacked Size

4.47 kB

Total Files

5

Last publish

Collaborators

  • pearofducks