# es6-shims

> ES6 shims that use native implementation if available

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

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

## Install

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

## Health

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

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 2.0.1 |
| Published | 2017-06-26 |
| First published | 2016-02-05 |
| Weekly downloads | 0 |
| License |  LGPL-3.0+ |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | The National Library of Finland |
| Maintainers | natlibfi-arlehiko |
| Keywords | es6, polyfill, shim, ecmascript, javascript, harmony, array, find, findindex |

## Links

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

## Recent versions

- 2.0.1 (latest) — 2017-06-26
- 2.0.0 — 2017-06-26
- 1.1.0 — 2016-03-13
- 1.0.2 — 2016-02-06
- 1.0.1 — 2016-02-06
- 1.0.0 — 2016-02-05

## README

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

A collection of [ES6](https://en.wikipedia.org/wiki/ECMAScript#ES6) [shims](https://en.wikipedia.org/wiki/Shim_%28computing%29) that use native implementations if available.

If you are looking for ES6 polyfills check out [es6-polyfills](https://github.com/natlibfi/es6-polyfills).

## List of shims

- **Array**
  - *Array.prototype.find* 
  - *Array.prototype.findIndex*

## 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

Individual shims can be found inside the containing object's directory, e.g. `lib/shims/array/`

### AMD

```javascript

define(['es6-shims/lib/shims/array'], function(shim_array) {

  // index === 1
  var index = shim_array.find([1, 2, 3], function(element) {
    return element === 2;
  });

});


```

### Browser globals

```javascript

  // index === 1
  var index = es6_shim_array.find([1, 2, 3], function(element) {
    return element === 2;
  });

});


```

### Node.js

```javascript

  var shim_array = require('es6-shims/lib/shims/array');
  // index === 1
  var index = shim_array.find([1, 2, 3], function(element) {
    return element === 2;
  });


```

## License and copyright

Copyright (c) 2016-2017 **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.

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