Sha256: 84d442766b22972a3fb1e5672a647e9979faaf885b8a4b363216f3af96326952

Contents?: true

Size: 1.64 KB

Versions: 16

Compression:

Stored size: 1.64 KB

Contents

# ES6 `String.prototype.repeat` polyfill [![Build status](https://travis-ci.org/mathiasbynens/String.prototype.repeat.svg?branch=master)](https://travis-ci.org/mathiasbynens/String.prototype.repeat)

A robust & optimized polyfill for [the `String.prototype.repeat` method in ECMAScript 6](http://ecma-international.org/ecma-262/6.0/#sec-string.prototype.repeat).

This package implements the [es-shim API](https://github.com/es-shims/api) interface. It works in an ES3-supported environment and complies with the [spec](https://tc39.es/ecma262/#sec-string.prototype.repeat).

Other polyfills for `String.prototype.repeat` are available:

* <https://github.com/paulmillr/es6-shim/blob/d8c4ec246a15e7df55da60b7f9b745af84ca9021/es6-shim.js#L146-L154> by [Paul Miller](http://paulmillr.com/) (~~[fails 8 tests](https://github.com/paulmillr/es6-shim/issues/164)~~ now passes all tests)

## Installation

Via [npm](https://www.npmjs.com/):

```bash
npm install string.prototype.repeat
```

Then, in [Node.js](https://nodejs.org/):

```js
var repeat = require('string.prototype.repeat');
```

In a browser:

```html
<script src="https://bundle.run/string.prototype.repeat"></script>
```

> **NOTE**: It's recommended that you install this module using a package manager
> such as `npm`, because loading multiple polyfills from a CDN (such as `bundle.run`)
> will lead to duplicated code.

## Author

| [![twitter/mathias](https://gravatar.com/avatar/24e08a9ea84deb17ae121074d0f17125?s=70)](https://twitter.com/mathias "Follow @mathias on Twitter") |
|---|
| [Mathias Bynens](https://mathiasbynens.be/) |

## License

This polyfill is available under the [MIT](https://mths.be/mit) license.

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
immosquare-cleaner-0.1.60 node_modules/string.prototype.repeat/README.md
immosquare-cleaner-0.1.59 node_modules/string.prototype.repeat/README.md
immosquare-cleaner-0.1.58 node_modules/string.prototype.repeat/README.md
immosquare-cleaner-0.1.57 node_modules/string.prototype.repeat/README.md
immosquare-cleaner-0.1.56 node_modules/string.prototype.repeat/README.md
immosquare-cleaner-0.1.55 node_modules/string.prototype.repeat/README.md
immosquare-cleaner-0.1.54 node_modules/string.prototype.repeat/README.md
immosquare-cleaner-0.1.53 node_modules/string.prototype.repeat/README.md
immosquare-cleaner-0.1.52 node_modules/string.prototype.repeat/README.md
immosquare-cleaner-0.1.51 node_modules/string.prototype.repeat/README.md
immosquare-cleaner-0.1.50 node_modules/string.prototype.repeat/README.md
immosquare-cleaner-0.1.49 node_modules/string.prototype.repeat/README.md
immosquare-cleaner-0.1.48 node_modules/string.prototype.repeat/README.md
immosquare-cleaner-0.1.47 node_modules/string.prototype.repeat/README.md
immosquare-cleaner-0.1.46 node_modules/string.prototype.repeat/README.md
immosquare-cleaner-0.1.45 node_modules/string.prototype.repeat/README.md