An open API service indexing awesome lists of open source software.

https://github.com/micheleriva/range-prototype

Extend your JavaScript Number type with a ~100 bytes polyfill
https://github.com/micheleriva/range-prototype

es5 es6 generator ie8 iterator javascript js nodejs polyfill prototype python range ruby

Last synced: 6 months ago
JSON representation

Extend your JavaScript Number type with a ~100 bytes polyfill

Awesome Lists containing this project

README

          

# Range Prototype

[![Build Status](https://travis-ci.org/micheleriva/range-prototype.svg?branch=master)](https://travis-ci.org/micheleriva/range-prototype)
[![License: MIT](https://img.shields.io/badge/License-MIT-green.svg)](https://opensource.org/licenses/MIT)

Extend your JavaScript `Number` type with a **100 bytes** polyfill:

```js
require('range-prototype')

const list = [...10] // => [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 ]
```

# Installation

**yarn**
```sh
$ yarn add range-prototype
```

**npm**
```sh
$ npm install range-prototype
```

then simply require it in your project:
```js
require('range-prototype')
```

**For old browsers**
```html

[...5] // => [ 0, 1, 2, 3, 4 ]

```

# License
[MIT](/LICENSE.md)