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