Version 1
[yaffs-website] / node_modules / grunt-legacy-log / node_modules / lodash / internal / arrayCopy.js
diff --git a/node_modules/grunt-legacy-log/node_modules/lodash/internal/arrayCopy.js b/node_modules/grunt-legacy-log/node_modules/lodash/internal/arrayCopy.js
new file mode 100644 (file)
index 0000000..fa7067f
--- /dev/null
@@ -0,0 +1,20 @@
+/**
+ * Copies the values of `source` to `array`.
+ *
+ * @private
+ * @param {Array} source The array to copy values from.
+ * @param {Array} [array=[]] The array to copy values to.
+ * @returns {Array} Returns `array`.
+ */
+function arrayCopy(source, array) {
+  var index = -1,
+      length = source.length;
+
+  array || (array = Array(length));
+  while (++index < length) {
+    array[index] = source[index];
+  }
+  return array;
+}
+
+module.exports = arrayCopy;