every.js 341 B

12345678910111213141516
  1. "use strict";
  2. var o = { 1: 1, 2: 2, 3: 3 };
  3. module.exports = function (t, a) {
  4. var o2 = {};
  5. t(o, function (value, name) {
  6. o2[name] = value;
  7. return true;
  8. });
  9. a(JSON.stringify(o2), JSON.stringify(o), "Iterates");
  10. a(t(o, function () { return true; }), true, "Succeeds");
  11. a(t(o, function () { return false; }), false, "Fails");
  12. };