every.js 348 B

123456789101112131415161718192021
  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 () {
  11. return true;
  12. }), true, "Succeeds");
  13. a(t(o, function () {
  14. return false;
  15. }), false, "Fails");
  16. };