# array-from

> A ponyfill for the ES 2015 (ES6) `Array.from()`.

Latest version **2.1.1** (published 2016-04-28) · MIT license · 0 weekly downloads

## Install

```sh
npm install array-from
pnpm add array-from
yarn add array-from
bun add array-from
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.1.1 |
| Published | 2016-04-28 |
| First published | 2015-05-12 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 16 |
| Maintainers | tomekwi |
| Keywords | Array.from, ponyfill, polyfill, convert, to, array, es-2015, es2015, es6 |

## Links

- npm: https://www.npmjs.com/package/array-from
- Repository: https://github.com/studio-b12/array-from
- Homepage: https://github.com/studio-b12/array-from#readme
- Issues: https://github.com/studio-b12/array-from/issues
- npm.io page: https://npm.io/package/array-from

## Alternatives

- [update-check](https://npm.io/package/update-check.md) — 4.0M weekly downloads
- [react-native-onesignal](https://npm.io/package/react-native-onesignal.md) — 134.5K weekly downloads
- [react-redux-toastr](https://npm.io/package/react-redux-toastr.md) — 33.7K weekly downloads
- [@nocobase/plugin-notification-manager](https://npm.io/package/@nocobase/plugin-notification-manager.md) — 2.0K weekly downloads
- [react-simple-toasts](https://npm.io/package/react-simple-toasts.md) — 1.9K weekly downloads

## Recent versions

- 2.1.1 (latest) — 2016-04-28
- 2.1.0 — 2016-04-28
- 2.0.2 — 2015-09-11
- 2.0.1 — 2015-09-11
- 2.0.0 — 2015-09-10
- 1.0.0 — 2015-05-12

## README

[![Coveralls – test coverage
](https://img.shields.io/coveralls/studio-b12/array-from.svg?style=flat-square
)](https://coveralls.io/r/studio-b12/array-from
) [![Travis – build status
](https://img.shields.io/travis/studio-b12/array-from/master.svg?style=flat-square
)](https://travis-ci.org/studio-b12/array-from
) [![David – status of dependencies
](https://img.shields.io/david/studio-b12/array-from.svg?style=flat-square
)](https://david-dm.org/studio-b12/array-from
) [![Code style: airbnb
](https://img.shields.io/badge/code%20style-airbnb-777777.svg?style=flat-square
)](https://github.com/airbnb/javascript)




array-from
==========

**A ponyfill for the ES 2015 [`Array.from()`][].**

**&ast; Ponyfill**: A polyfill that doesn't overwrite the native method.  
**&ast; ES 2015**: The new name for ES6 that [nobody expected][].

Modeled after the final ES 2015 spec. Credits for the implementation go to the amazing folks of the MDN and [our awesome contributors](https://github.com/studio-b12/array-from/graphs/contributors).

&nbsp;

[`Array.from()`]:         https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/from                  "Array.from()"
[nobody expected]:        http://webreflection.blogspot.de/2015/01/javascript-and-living-ecmascript.html                               "JavaScript and the living ECMAScript Standard"



Installation
------------

```sh
$ npm install array-from
```




Usage
-----

Recommended:

```js
var arrayFrom = require('array-from');
  // You’ll get the native `Array.from` if it’s available.

function () {console.log(
  arrayFrom(arguments).map(require('1-liners/increment'))
);}(1, 2, 3);
//» [2, 3, 4]
```

You can also use it as a classical polyfill. It’s [not recommended][], but sometimes practical:

```js
if (!Array.from) Array.from = require('array-from');
  // This will affect all loaded modules.

function () {console.log(
  Array.from(arguments).map(require('1-liners/increment'))
);}(1, 2, 3);
//» [2, 3, 4]
```

[not recommended]:  https://github.com/sindresorhus/object-assign/issues/10#issuecomment-65065859  "Optionally shim native method?"




Support note
------------

We support the _current_ and _active LTS_ release of Node.js. More info in [nodejs/LTS](https://github.com/nodejs/LTS#lts_schedule).




License
-------

[MIT][] © [Studio B12 GmbH][]

[MIT]: ./License.md
[Studio B12 GmbH]: https://github.com/studio-b12

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