mirror of
https://github.com/rhinstaller/node-cache.git
synced 2026-11-03 21:49:47 -09:00
20 lines
414 B
JavaScript
20 lines
414 B
JavaScript
'use strict';
|
|
|
|
var define = require('define-properties');
|
|
var shimUnscopables = require('es-shim-unscopables');
|
|
|
|
var getPolyfill = require('./polyfill');
|
|
|
|
module.exports = function shimFlatMap() {
|
|
var polyfill = getPolyfill();
|
|
|
|
define(
|
|
Array.prototype,
|
|
{ flatMap: polyfill },
|
|
{ flatMap: function () { return Array.prototype.flatMap !== polyfill; } }
|
|
);
|
|
|
|
shimUnscopables('flatMap');
|
|
|
|
return polyfill;
|
|
};
|