code: function emptyObject(o, {keep}) {
    keep = keep || {};
    for (let pair of objectPairs(o)) {
      let [k, v] = pair;
      var ctor = v && v.constructor;
      if (keep && ctor === Object) emptyObject(v);
      else o[k] = ctor && ctor();
    }
  }
docs: "Empty" the object, optionally keeping structure of subobjects with `{keep: true}` option. Numbers turn to zero, booleans to false, arrays are emptied, etc.