source: imaps-frontend/node_modules/core-js/modules/es.array.reduce.js

main
Last change on this file was 79a0317, checked in by stefan toskovski <stefantoska84@…>, 4 days ago

F4 Finalna Verzija

  • Property mode set to 100644
File size: 880 bytes
Line 
1'use strict';
2var $ = require('../internals/export');
3var $reduce = require('../internals/array-reduce').left;
4var arrayMethodIsStrict = require('../internals/array-method-is-strict');
5var CHROME_VERSION = require('../internals/environment-v8-version');
6var IS_NODE = require('../internals/environment-is-node');
7
8// Chrome 80-82 has a critical bug
9// https://bugs.chromium.org/p/chromium/issues/detail?id=1049982
10var CHROME_BUG = !IS_NODE && CHROME_VERSION > 79 && CHROME_VERSION < 83;
11var FORCED = CHROME_BUG || !arrayMethodIsStrict('reduce');
12
13// `Array.prototype.reduce` method
14// https://tc39.es/ecma262/#sec-array.prototype.reduce
15$({ target: 'Array', proto: true, forced: FORCED }, {
16 reduce: function reduce(callbackfn /* , initialValue */) {
17 var length = arguments.length;
18 return $reduce(this, callbackfn, length, length > 1 ? arguments[1] : undefined);
19 }
20});
Note: See TracBrowser for help on using the repository browser.