Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/pearofducks/koa-polyfill
middleware to provide dynamic polyfills - based on polyfill.io v3
https://github.com/pearofducks/koa-polyfill
koa middleware polyfill
Last synced: about 2 months ago
JSON representation
middleware to provide dynamic polyfills - based on polyfill.io v3
- Host: GitHub
- URL: https://github.com/pearofducks/koa-polyfill
- Owner: pearofducks
- License: mit
- Created: 2019-08-01T11:23:15.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2019-08-01T11:41:51.000Z (over 5 years ago)
- Last Synced: 2024-10-31T19:12:03.943Z (3 months ago)
- Topics: koa, middleware, polyfill
- Language: JavaScript
- Homepage:
- Size: 40 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
> koa-polyfill
Middleware that provides a self-hosted version of polyfill.io
#### use
```js
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.