- Complete React app with 7 developer tools - JSON Tool with visual structured editor - Serialize Tool with visual structured editor - URL, Base64, CSV/JSON, Beautifier, Diff tools - Responsive navigation with dropdown menu - Dark/light mode toggle - Mobile-responsive design with sticky header - All tools working with copy/paste functionality
20 lines
672 B
JavaScript
20 lines
672 B
JavaScript
'use strict';
|
|
var $ = require('../internals/export');
|
|
var uncurryThis = require('../internals/function-uncurry-this');
|
|
var isArray = require('../internals/is-array');
|
|
|
|
var nativeReverse = uncurryThis([].reverse);
|
|
var test = [1, 2];
|
|
|
|
// `Array.prototype.reverse` method
|
|
// https://tc39.es/ecma262/#sec-array.prototype.reverse
|
|
// fix for Safari 12.0 bug
|
|
// https://bugs.webkit.org/show_bug.cgi?id=188794
|
|
$({ target: 'Array', proto: true, forced: String(test) === String(test.reverse()) }, {
|
|
reverse: function reverse() {
|
|
// eslint-disable-next-line no-self-assign -- dirty hack
|
|
if (isArray(this)) this.length = this.length;
|
|
return nativeReverse(this);
|
|
}
|
|
});
|