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.

21 lines
610 B

  1. "use strict";
  2. var toPosInt = require("../../number/to-pos-integer")
  3. , eq = require("../../object/eq")
  4. , value = require("../../object/valid-value")
  5. , objHasOwnProperty = Object.prototype.hasOwnProperty;
  6. module.exports = function (other) {
  7. var i, length;
  8. value(this);
  9. value(other);
  10. length = toPosInt(this.length);
  11. if (length !== toPosInt(other.length)) return false;
  12. for (i = 0; i < length; ++i) {
  13. if (objHasOwnProperty.call(this, i) !== objHasOwnProperty.call(other, i)) {
  14. return false;
  15. }
  16. if (!eq(this[i], other[i])) return false;
  17. }
  18. return true;
  19. };