summaryrefslogtreecommitdiff
path: root/node_modules/@jet/environment/util/clone.js
diff options
context:
space:
mode:
authorrxliuli <rxliuli@gmail.com>2025-11-04 05:03:50 +0800
committerrxliuli <rxliuli@gmail.com>2025-11-04 05:03:50 +0800
commitbce557cc2dc767628bed6aac87301a1be7c5431b (patch)
treeb51a051228d01fe3306cd7626d4a96768aadb944 /node_modules/@jet/environment/util/clone.js
init commit
Diffstat (limited to 'node_modules/@jet/environment/util/clone.js')
-rw-r--r--node_modules/@jet/environment/util/clone.js18
1 files changed, 18 insertions, 0 deletions
diff --git a/node_modules/@jet/environment/util/clone.js b/node_modules/@jet/environment/util/clone.js
new file mode 100644
index 0000000..594a597
--- /dev/null
+++ b/node_modules/@jet/environment/util/clone.js
@@ -0,0 +1,18 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.shallowCloneOf = void 0;
+/**
+ * Create a copy of a given object without copying any of its members.
+ *
+ * Use this function to efficiently copy an object for your
+ * implementation of the `Clone` interface.
+ *
+ * @param object - An object to create a shallow copy of.
+ * @returns A new shallow copy of `object`.
+ */
+function shallowCloneOf(object) {
+ const copy = Object.create(Object.getPrototypeOf(object));
+ return Object.assign(copy, object);
+}
+exports.shallowCloneOf = shallowCloneOf;
+//# sourceMappingURL=clone.js.map \ No newline at end of file