is-array-like.js 441 B

12345678910111213141516171819202122
  1. "use strict";
  2. module.exports = function (t, a) {
  3. a(t([]), true, "Array");
  4. a(t(""), true, "String");
  5. a(
  6. t(
  7. (function () {
  8. return arguments;
  9. })()
  10. ),
  11. true,
  12. "Arguments"
  13. );
  14. a(t({ length: 0 }), true, "List object");
  15. a(t(function () {}), false, "Function");
  16. a(t({}), false, "Plain object");
  17. a(t(/raz/), false, "Regexp");
  18. a(t(), false, "No argument");
  19. a(t(null), false, "Null");
  20. a(t(undefined), false, "Undefined");
  21. };