group.js 550 B

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