summaryrefslogtreecommitdiff
path: root/deps/npm/node_modules/cli-table2/node_modules/lodash/array/initial.js
diff options
context:
space:
mode:
Diffstat (limited to 'deps/npm/node_modules/cli-table2/node_modules/lodash/array/initial.js')
-rw-r--r--deps/npm/node_modules/cli-table2/node_modules/lodash/array/initial.js20
1 files changed, 20 insertions, 0 deletions
diff --git a/deps/npm/node_modules/cli-table2/node_modules/lodash/array/initial.js b/deps/npm/node_modules/cli-table2/node_modules/lodash/array/initial.js
new file mode 100644
index 0000000000..59b7a7d96d
--- /dev/null
+++ b/deps/npm/node_modules/cli-table2/node_modules/lodash/array/initial.js
@@ -0,0 +1,20 @@
+var dropRight = require('./dropRight');
+
+/**
+ * Gets all but the last element of `array`.
+ *
+ * @static
+ * @memberOf _
+ * @category Array
+ * @param {Array} array The array to query.
+ * @returns {Array} Returns the slice of `array`.
+ * @example
+ *
+ * _.initial([1, 2, 3]);
+ * // => [1, 2]
+ */
+function initial(array) {
+ return dropRight(array, 1);
+}
+
+module.exports = initial;