Front end of the Slack clone application.

clear.js 268B

1234567891011121314151617
  1. "use strict";
  2. var keys = require("./keys");
  3. module.exports = function (obj) {
  4. var error;
  5. keys(obj).forEach(function (key) {
  6. try {
  7. delete this[key];
  8. } catch (e) {
  9. if (!error) error = e;
  10. }
  11. }, obj);
  12. if (error !== undefined) throw error;
  13. return obj;
  14. };