main
Last change
on this file was d565449, checked in by stefan toskovski <stefantoska84@…>, 4 weeks ago |
Update repo after prototype presentation
|
-
Property mode
set to
100644
|
File size:
344 bytes
|
Line | |
---|
1 | /*! https://mths.be/repeat v1.0.0 by @mathias */
|
---|
2 |
|
---|
3 | 'use strict';
|
---|
4 |
|
---|
5 | var define = require('define-properties');
|
---|
6 |
|
---|
7 | var getPolyfill = require('./polyfill');
|
---|
8 |
|
---|
9 | module.exports = function shimRepeat() {
|
---|
10 | var polyfill = getPolyfill();
|
---|
11 |
|
---|
12 | if (String.prototype.repeat !== polyfill) {
|
---|
13 | define(String.prototype, { repeat: polyfill });
|
---|
14 | }
|
---|
15 |
|
---|
16 | return polyfill;
|
---|
17 | };
|
---|
Note:
See
TracBrowser
for help on using the repository browser.