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