Version 1
[yaffs-website] / node_modules / grunt-legacy-log-utils / node_modules / lodash / _baseCreate.js
diff --git a/node_modules/grunt-legacy-log-utils/node_modules/lodash/_baseCreate.js b/node_modules/grunt-legacy-log-utils/node_modules/lodash/_baseCreate.js
new file mode 100644 (file)
index 0000000..64d53ec
--- /dev/null
@@ -0,0 +1,23 @@
+var isObject = require('./isObject');
+
+/**
+ * The base implementation of `_.create` without support for assigning
+ * properties to the created object.
+ *
+ * @private
+ * @param {Object} prototype The object to inherit from.
+ * @returns {Object} Returns the new object.
+ */
+var baseCreate = (function() {
+  function object() {}
+  return function(prototype) {
+    if (isObject(prototype)) {
+      object.prototype = prototype;
+      var result = new object;
+      object.prototype = undefined;
+    }
+    return result || {};
+  };
+}());
+
+module.exports = baseCreate;