group.js 582 B

123456789101112131415161718192021222324252627282930
  1. "use strict";
  2. module.exports = {
  3. "__generic": function (t, a) {
  4. var count = 0, self;
  5. self = Object(this);
  6. a.deep(
  7. t.call(
  8. self,
  9. function (v, i, scope) {
  10. a(v, this[i], "Value");
  11. a(i, count++, "Index");
  12. a(scope, this, "Scope");
  13. return i;
  14. },
  15. self
  16. ),
  17. { 0: [this[0]], 1: [this[1]], 2: [this[2]] }
  18. );
  19. },
  20. "": function (t, a) {
  21. var r;
  22. r = t.call([2, 3, 3, 4, 5, 6, 7, 7, 23, 45, 34, 56], function (v) {
  23. return v % 2 ? "odd" : "even";
  24. });
  25. a.deep(r.odd, [3, 3, 5, 7, 7, 23, 45]);
  26. a.deep(r.even, [2, 4, 6, 34, 56]);
  27. }
  28. };