Version 1
[yaffs-website] / node_modules / grunt-legacy-log-utils / node_modules / lodash / flattenDeep.js
diff --git a/node_modules/grunt-legacy-log-utils/node_modules/lodash/flattenDeep.js b/node_modules/grunt-legacy-log-utils/node_modules/lodash/flattenDeep.js
new file mode 100644 (file)
index 0000000..3daab79
--- /dev/null
@@ -0,0 +1,21 @@
+var baseFlatten = require('./_baseFlatten');
+
+/**
+ * This method is like `_.flatten` except that it recursively flattens `array`.
+ *
+ * @static
+ * @memberOf _
+ * @category Array
+ * @param {Array} array The array to recursively flatten.
+ * @returns {Array} Returns the new flattened array.
+ * @example
+ *
+ * _.flattenDeep([1, [2, 3, [4]]]);
+ * // => [1, 2, 3, 4]
+ */
+function flattenDeep(array) {
+  var length = array ? array.length : 0;
+  return length ? baseFlatten(array, true) : [];
+}
+
+module.exports = flattenDeep;