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
624 B

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