source: node_modules/ramda/src/head.js

main
Last change on this file was d24f17c, checked in by Aleksandar Panovski <apano77@…>, 15 months ago

Initial commit

  • Property mode set to 100644
File size: 573 bytes
Line 
1var nth =
2/*#__PURE__*/
3require("./nth.js");
4/**
5 * Returns the first element of the given list or string. In some libraries
6 * this function is named `first`.
7 *
8 * @func
9 * @memberOf R
10 * @since v0.1.0
11 * @category List
12 * @sig [a] -> a | Undefined
13 * @sig String -> String
14 * @param {Array|String} list
15 * @return {*}
16 * @see R.tail, R.init, R.last
17 * @example
18 *
19 * R.head(['fi', 'fo', 'fum']); //=> 'fi'
20 * R.head([]); //=> undefined
21 *
22 * R.head('abc'); //=> 'a'
23 * R.head(''); //=> ''
24 */
25
26
27var head =
28/*#__PURE__*/
29nth(0);
30module.exports = head;
Note: See TracBrowser for help on using the repository browser.