source: node_modules/ramda/es/tail.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: 921 bytes
Line 
1import _checkForMethod from "./internal/_checkForMethod.js";
2import _curry1 from "./internal/_curry1.js";
3import slice from "./slice.js";
4/**
5 * Returns all but the first element of the given list or string (or object
6 * with a `tail` method).
7 *
8 * Dispatches to the `slice` method of the first argument, if present.
9 *
10 * @func
11 * @memberOf R
12 * @since v0.1.0
13 * @category List
14 * @sig [a] -> [a]
15 * @sig String -> String
16 * @param {*} list
17 * @return {*}
18 * @see R.head, R.init, R.last
19 * @example
20 *
21 * R.tail([1, 2, 3]); //=> [2, 3]
22 * R.tail([1, 2]); //=> [2]
23 * R.tail([1]); //=> []
24 * R.tail([]); //=> []
25 *
26 * R.tail('abc'); //=> 'bc'
27 * R.tail('ab'); //=> 'b'
28 * R.tail('a'); //=> ''
29 * R.tail(''); //=> ''
30 */
31
32var tail =
33/*#__PURE__*/
34_curry1(
35/*#__PURE__*/
36_checkForMethod('tail',
37/*#__PURE__*/
38slice(1, Infinity)));
39
40export default tail;
Note: See TracBrowser for help on using the repository browser.