1.2.0 • Published 7 years ago

@rill/polyfill v1.2.0

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

A small wrapper around polyfill-service which allows automatic user-agent based polyfills to be sent with Rill.

Installation

npm install @rill/polyfill

Example

const app = require('rill')()
const polyfill = require('@rill/polyfill')

// Setup route to send the polyfill.
app.get('/polyfill.js.min', polyfill({ minify: true }))

In the browser

<script src="/polyfill.js.min"></script>

API Options/Defaults

{
  // The cache time for the polyfill file (string or number of seconds).
  maxage: '1 year',
  // Enable or disable minification.
  minify: true,
  // Enable or disable polyfilling unknown user agents.
  unknown: true,
  // Array of excluded features.
  excludes: undefined,
  // Object containing the features to pollyfill (defaults to all).
  features: undefined
}

For a list of polyfills and more documentation click here


Contributions

  • Use npm test to run tests.

Please feel free to create a PR!

1.2.0

7 years ago

1.1.5

7 years ago

1.1.4

7 years ago

1.1.3

7 years ago

1.1.2

7 years ago

1.1.1

8 years ago

1.1.0

8 years ago

1.0.0

8 years ago

0.1.0

8 years ago