Version 1
[yaffs-website] / node_modules / grunt-legacy-log / node_modules / lodash / internal / initCloneObject.js
diff --git a/node_modules/grunt-legacy-log/node_modules/lodash/internal/initCloneObject.js b/node_modules/grunt-legacy-log/node_modules/lodash/internal/initCloneObject.js
new file mode 100644 (file)
index 0000000..48c4a23
--- /dev/null
@@ -0,0 +1,16 @@
+/**
+ * Initializes an object clone.
+ *
+ * @private
+ * @param {Object} object The object to clone.
+ * @returns {Object} Returns the initialized clone.
+ */
+function initCloneObject(object) {
+  var Ctor = object.constructor;
+  if (!(typeof Ctor == 'function' && Ctor instanceof Ctor)) {
+    Ctor = Object;
+  }
+  return new Ctor;
+}
+
+module.exports = initCloneObject;