clone.js
 1  "use strict";
 2  Object.defineProperty(exports, "__esModule", { value: true });
 3  exports.shallowCloneOf = void 0;
 4  /**
 5   * Create a copy of a given object without copying any of its members.
 6   *
 7   * Use this function to efficiently copy an object for your
 8   * implementation of the `Clone` interface.
 9   *
10   * @param object - An object to create a shallow copy of.
11   * @returns A new shallow copy of `object`.
12   */
13  function shallowCloneOf(object) {
14      const copy = Object.create(Object.getPrototypeOf(object));
15      return Object.assign(copy, object);
16  }
17  exports.shallowCloneOf = shallowCloneOf;
18  //# sourceMappingURL=clone.js.map