We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
flatMap
1 parent ec814e4 commit a7159c7Copy full SHA for a7159c7
src/Control/Bind.js
@@ -1,4 +1,10 @@
1
export const arrayBind = function (arr) {
2
+ if (typeof Array.prototype.flatMap === "function") {
3
+ return function (f) {
4
+ return arr.flatMap(f);
5
+ };
6
+ }
7
+
8
return function (f) {
9
var result = [];
10
for (var i = 0, l = arr.length; i < l; i++) {
0 commit comments