clear.js 295 B

12345678910111213
  1. "use strict";
  2. var isEmpty = require("../../object/is-empty");
  3. module.exports = function (t, a) {
  4. var x = {};
  5. a(t(x), x, "Empty: Returns same object");
  6. a(isEmpty(x), true, "Empty: Not changed");
  7. x.foo = "raz";
  8. x.bar = "dwa";
  9. a(t(x), x, "Same object");
  10. a(isEmpty(x), true, "Emptied");
  11. };