source: node_modules/ramda/src/dropLast.js@ 65b6638

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

Initial commit

  • Property mode set to 100644
File size: 1.2 KB
Line 
1var _curry2 =
2/*#__PURE__*/
3require("./internal/_curry2.js");
4
5var _dispatchable =
6/*#__PURE__*/
7require("./internal/_dispatchable.js");
8
9var _dropLast =
10/*#__PURE__*/
11require("./internal/_dropLast.js");
12
13var _xdropLast =
14/*#__PURE__*/
15require("./internal/_xdropLast.js");
16/**
17 * Returns a list containing all but the last `n` elements of the given `list`.
18 *
19 * Acts as a transducer if a transformer is given in list position.
20 *
21 * @func
22 * @memberOf R
23 * @since v0.16.0
24 * @category List
25 * @sig Number -> [a] -> [a]
26 * @sig Number -> String -> String
27 * @param {Number} n The number of elements of `list` to skip.
28 * @param {Array} list The list of elements to consider.
29 * @return {Array} A copy of the list with only the first `list.length - n` elements
30 * @see R.takeLast, R.drop, R.dropWhile, R.dropLastWhile
31 * @example
32 *
33 * R.dropLast(1, ['foo', 'bar', 'baz']); //=> ['foo', 'bar']
34 * R.dropLast(2, ['foo', 'bar', 'baz']); //=> ['foo']
35 * R.dropLast(3, ['foo', 'bar', 'baz']); //=> []
36 * R.dropLast(4, ['foo', 'bar', 'baz']); //=> []
37 * R.dropLast(3, 'ramda'); //=> 'ra'
38 */
39
40
41var dropLast =
42/*#__PURE__*/
43_curry2(
44/*#__PURE__*/
45_dispatchable([], _xdropLast, _dropLast));
46
47module.exports = dropLast;
Note: See TracBrowser for help on using the repository browser.