Version 1
[yaffs-website] / node_modules / grunt-legacy-log / node_modules / lodash / internal / createDefaults.js
diff --git a/node_modules/grunt-legacy-log/node_modules/lodash/internal/createDefaults.js b/node_modules/grunt-legacy-log/node_modules/lodash/internal/createDefaults.js
new file mode 100644 (file)
index 0000000..5663bcb
--- /dev/null
@@ -0,0 +1,22 @@
+var restParam = require('../function/restParam');
+
+/**
+ * Creates a `_.defaults` or `_.defaultsDeep` function.
+ *
+ * @private
+ * @param {Function} assigner The function to assign values.
+ * @param {Function} customizer The function to customize assigned values.
+ * @returns {Function} Returns the new defaults function.
+ */
+function createDefaults(assigner, customizer) {
+  return restParam(function(args) {
+    var object = args[0];
+    if (object == null) {
+      return object;
+    }
+    args.push(customizer);
+    return assigner.apply(undefined, args);
+  });
+}
+
+module.exports = createDefaults;