# es6-polyfills

> ES6 polyfills that use native implementation if available and do not pollute the global namespace

Latest version **2.0.0** (published 2017-06-26) ·  LGPL-3.0+ license · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

```sh
npm install es6-polyfills
pnpm add es6-polyfills
yarn add es6-polyfills
bun add es6-polyfills
```

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 2.0.0 |
| Published | 2017-06-26 |
| First published | 2016-01-12 |
| Weekly downloads | 0 |
| License |  LGPL-3.0+ |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | The National Library of Finland |
| Maintainers | natlibfi-arlehiko |
| Keywords | es6, polyfill, shim, ecmascript, harmony, object, assign, promise |

## Links

- npm: https://www.npmjs.com/package/es6-polyfills
- Repository: https://github.com/NatLibFi/es6-polyfills
- Issues: https://github.com/NatLibFi/es6-polyfills/issues
- npm.io page: https://npm.io/package/es6-polyfills

## Dependencies (2)

- [es6-object-assign](https://npm.io/package/es6-object-assign.md) ^1.0.3
- [es6-promise-polyfill](https://npm.io/package/es6-promise-polyfill.md) ^1.2.0

## Alternatives

- [@commercetools/sync-actions](https://npm.io/package/@commercetools/sync-actions.md) — 25.1K weekly downloads
- [cwait](https://npm.io/package/cwait.md) — 21.4K weekly downloads
- [@ledgerhq/hw-app-cosmos](https://npm.io/package/@ledgerhq/hw-app-cosmos.md) — 4.2K weekly downloads
- [@financial-times/o-loading](https://npm.io/package/@financial-times/o-loading.md) — 2.8K weekly downloads
- [fa](https://npm.io/package/fa.md) — 185 weekly downloads

## Recent versions

- 2.0.0 (latest) — 2017-06-26
- 1.1.0 — 2016-09-09
- 1.0.1 — 2016-01-13
- 1.0.0 — 2016-01-12

## README

# ES6 polyfills [![NPM Version](https://img.shields.io/npm/v/es6-polyfills.svg)](https://npmjs.org/package/es6-polyfills) [![Build Status](https://travis-ci.org/NatLibFi/es6-polyfills.svg)](https://travis-ci.org/NatLibFi/es6-polyfills) [![Test Coverage](https://codeclimate.com/github/NatLibFi/es6-polyfills/badges/coverage.svg)](https://codeclimate.com/github/NatLibFi/es6-polyfills/coverage)

A collection of [ES6](https://en.wikipedia.org/wiki/ECMAScript#ES6) polyfills that use native implementations if available and do not pollute the global namespace

## List of polyfills

- **Object** ([Object.assign](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/assign))
- **Array** ([Array.of](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/of))
- **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise)**

Polyfill implementations are from different projects:

- **Object** (*Object.assign*): https://github.com/rubennorte/es6-object-assign
- **Promise**: https://github.com/lahmatiy/es6-promise-polyfill

## Installation

Clone the sources and install the package (In the source directory) on command line using `npm`:

```sh
npm install
```

## Testing

Run the following NPM script to lint, test and check coverage of the code:

```javascript

npm run check

```

## Usage

### AMD

```javascript

define(['es6-polyfills/lib/polyfills/promise'], function(Promise) {

 var p = new Promise(function(resolve, reject){
  resolve(); 
 });

});


```

### Node.js

```javascript

var Promise = require('es6-polyfills/lib/polyfills/promise');
var p = new Promise(function(resolve, reject){
  resolve();
});

```

## License and copyright

Copyright (c) 2015-2016 **University Of Helsinki (The National Library Of Finland)**

This project's source code is licensed under the terms of **GNU Lesser General Public License Version 3** or any later version. See each polyfill implementation for their respective licensing terms.

---
_Source: https://npm.io/package/es6-polyfills · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
