1.0.10 • Published 7 years ago

polyfill-service-express v1.0.10

Weekly downloads
2
License
MIT
Repository
github
Last release
7 years ago

Express middleware for polyfill-service

Modification of serving API of polyfill-service v2 as an express middleware. It uses your own server and doesn't use metrics or user statistics.

Usage

The usage is simular to polyfill-service, but you define the route you want to request by using it as an module of express. The request-query should work as for usage at polyfill.io.

  const express = require('express');
  const app = express();
  const polyfills = require('express-middleware-polyfill-service')();

  app.get(/^\/polyfill(\.\w+)(\.\w+)?/, polyfills);

License

The module is licensed under the terms of the MIT license.