summaryrefslogtreecommitdiff
path: root/bin/wiki/ImportarDesdeURL/node_modules/lodash/last.js
diff options
context:
space:
mode:
Diffstat (limited to 'bin/wiki/ImportarDesdeURL/node_modules/lodash/last.js')
-rw-r--r--bin/wiki/ImportarDesdeURL/node_modules/lodash/last.js20
1 files changed, 20 insertions, 0 deletions
diff --git a/bin/wiki/ImportarDesdeURL/node_modules/lodash/last.js b/bin/wiki/ImportarDesdeURL/node_modules/lodash/last.js
new file mode 100644
index 00000000..cad1eafa
--- /dev/null
+++ b/bin/wiki/ImportarDesdeURL/node_modules/lodash/last.js
@@ -0,0 +1,20 @@
+/**
+ * Gets the last element of `array`.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Array
+ * @param {Array} array The array to query.
+ * @returns {*} Returns the last element of `array`.
+ * @example
+ *
+ * _.last([1, 2, 3]);
+ * // => 3
+ */
+function last(array) {
+ var length = array == null ? 0 : array.length;
+ return length ? array[length - 1] : undefined;
+}
+
+module.exports = last;