web 3d图形渲染器
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

15 lines
529 B

  1. "use strict";
  2. var isPlainArray = require("../../is-plain-array")
  3. , isArray = Array.isArray
  4. , splice = Array.prototype.splice
  5. , forEach = Array.prototype.forEach;
  6. // eslint-disable-next-line no-unused-vars
  7. module.exports = function (start, deleteCount/*, …items*/) {
  8. var arr = splice.apply(this, arguments), result;
  9. if (!this || !isArray(this) || isPlainArray(this)) return arr;
  10. result = new this.constructor(arr.length);
  11. forEach.call(arr, function (val, i) { result[i] = val; });
  12. return result;
  13. };