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:
399 bytes
|
Line | |
---|
1 | 'use strict';
|
---|
2 |
|
---|
3 | var define = require('define-properties');
|
---|
4 | var shimUnscopables = require('es-shim-unscopables');
|
---|
5 |
|
---|
6 | var getPolyfill = require('./polyfill');
|
---|
7 |
|
---|
8 | module.exports = function shimFlat() {
|
---|
9 | var polyfill = getPolyfill();
|
---|
10 |
|
---|
11 | define(
|
---|
12 | Array.prototype,
|
---|
13 | { flat: polyfill },
|
---|
14 | { flat: function () { return Array.prototype.flat !== polyfill; } }
|
---|
15 | );
|
---|
16 |
|
---|
17 | shimUnscopables('flat');
|
---|
18 |
|
---|
19 | return polyfill;
|
---|
20 | };
|
---|
Note:
See
TracBrowser
for help on using the repository browser.