File tree Expand file tree Collapse file tree 2 files changed +22
-1
lines changed Expand file tree Collapse file tree 2 files changed +22
-1
lines changed Original file line number Diff line number Diff line change 1111 strategy :
1212 matrix :
1313 os : [ ubuntu-latest ]
14- node-version : [12.x, 14.x]
14+ node-version : [10.x, 12.x, 14.x]
1515 fail-fast : false
1616
1717 steps :
Original file line number Diff line number Diff line change 11main -> Mailbox | Path
22
33@{%
4+ // from https://github.com/jonathantneal/array-flat-polyfill
5+ if (! Array .prototype .flat ) {
6+ Object .defineProperty (Array .prototype , ' flat' , {
7+ configurable: true ,
8+ value : function flat () {
9+ var depth = isNaN (arguments [0 ]) ? 1 : Number (arguments [0 ]);
10+
11+ return depth ? Array .prototype .reduce .call (this , function (acc , cur ) {
12+ if (Array .isArray (cur)) {
13+ acc .push .apply (acc, flat .call (cur, depth - 1 ));
14+ } else {
15+ acc .push (cur);
16+ }
17+
18+ return acc;
19+ }, []) : Array .prototype .slice .call (this );
20+ },
21+ writable: true
22+ });
23+ }
24+
425function flat_string (d ) {
526 if (d) {
627 if (Array .isArray (d))
You can’t perform that action at this time.
0 commit comments