source: imaps-frontend/node_modules/core-js/modules/es.array.reverse.js@ 79a0317

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

F4 Finalna Verzija

  • Property mode set to 100644
File size: 672 bytes
Line 
1'use strict';
2var $ = require('../internals/export');
3var uncurryThis = require('../internals/function-uncurry-this');
4var isArray = require('../internals/is-array');
5
6var nativeReverse = uncurryThis([].reverse);
7var test = [1, 2];
8
9// `Array.prototype.reverse` method
10// https://tc39.es/ecma262/#sec-array.prototype.reverse
11// fix for Safari 12.0 bug
12// https://bugs.webkit.org/show_bug.cgi?id=188794
13$({ target: 'Array', proto: true, forced: String(test) === String(test.reverse()) }, {
14 reverse: function reverse() {
15 // eslint-disable-next-line no-self-assign -- dirty hack
16 if (isArray(this)) this.length = this.length;
17 return nativeReverse(this);
18 }
19});
Note: See TracBrowser for help on using the repository browser.