compact.js 355 B

1234567891011121314
  1. 'use strict';
  2. module.exports = function (t, a) {
  3. var x = {}, y = {}, z;
  4. z = t(x);
  5. a.not(z, x, "Returns different object");
  6. a.deep(z, {}, "Empty on empty");
  7. x = { foo: 'bar', a: 0, b: false, c: '', d: '0', e: null, bar: y,
  8. elo: undefined };
  9. z = t(x);
  10. a.deep(z, { foo: 'bar', a: 0, b: false, c: '', d: '0', bar: y },
  11. "Cleared null values");
  12. };