We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
shim
auto
flatMap
Symbol.unscopables
1 parent 3ba7820 commit bd64affCopy full SHA for bd64aff
2 files changed
package.json
@@ -48,7 +48,8 @@
48
"dependencies": {
49
"call-bind": "^1.0.2",
50
"define-properties": "^1.1.3",
51
- "es-abstract": "^1.19.2"
+ "es-abstract": "^1.19.2",
52
+ "es-shim-unscopables": "^1.0.0"
53
},
54
"devDependencies": {
55
"@es-shims/api": "^2.2.3",
shim.js
@@ -1,14 +1,20 @@
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 shimFlatMap() {
9
var polyfill = getPolyfill();
10
11
define(
12
Array.prototype,
13
{ flatMap: polyfill },
14
{ flatMap: function () { return Array.prototype.flatMap !== polyfill; } }
15
);
16
17
+ shimUnscopables('flatMap');
18
19
return polyfill;
20
};
0 commit comments