to-array.js 343 B

123456789101112131415
  1. "use strict";
  2. module.exports = function (t, a) {
  3. var o = { 1: 1, 2: 2, 3: 3 }, o1 = {}
  4. , o2 = t(o, function (value, name, self) {
  5. a(self, o, "Self");
  6. a(this, o1, "Scope");
  7. return value + Number(name);
  8. }, o1);
  9. a.deep(o2, [2, 4, 6]);
  10. t(o).sort().forEach(function (item) {
  11. a.deep(item, [item[0], o[item[0]]], "Default");
  12. });
  13. };