const { defineProperties, getOwnPropertyDescriptors } = Object; /** * A root Array-like "class" compatible with both es5 and es6 styles */ export function ArrayLike() { if (!(this instanceof ArrayLike)) { // "callable-constructor" why not? return new ArrayLike(...arguments); } Array.apply(this, arguments); } defineProperties( ArrayLike.prototype, getOwnPropertyDescriptors(Array.prototype) ); export default ArrayLike;