_sub-array-dummy.js 430 B

1234567891011121314151617181920
  1. "use strict";
  2. var setPrototypeOf = require("../object/set-prototype-of");
  3. module.exports = (function () {
  4. var SubArray;
  5. if (!setPrototypeOf) return null;
  6. SubArray = function () {
  7. Array.apply(this, arguments);
  8. };
  9. setPrototypeOf(SubArray, Array);
  10. SubArray.prototype = Object.create(Array.prototype, {
  11. constructor: { value: SubArray,
  12. enumerable: false,
  13. writable: true,
  14. configurable: true }
  15. });
  16. return SubArray;
  17. }());