Ponyfill for Array.prototype.toReversed
npm install @frosted/array-reverseconstreverse=require("@frosted/array-reverse")console.log(reverse([1,2,3]))// [3, 2, 1]console.log(reverse("not array"))// Error: Expects an arrayShimming Array.prototype.reverse:
require("@frosted/array-reverse/shim")console.log([1,2,3].toReversed())// [3, 2, 1]Simply clone the repo and run npm test