1 | var _curry2 =
|
2 | /*#__PURE__*/
|
3 | require("./internal/_curry2");
|
4 |
|
5 | var _dispatchable =
|
6 | /*#__PURE__*/
|
7 | require("./internal/_dispatchable");
|
8 |
|
9 | var _dropLastWhile =
|
10 | /*#__PURE__*/
|
11 | require("./internal/_dropLastWhile");
|
12 |
|
13 | var _xdropLastWhile =
|
14 | /*#__PURE__*/
|
15 | require("./internal/_xdropLastWhile");
|
16 | /**
|
17 | * Returns a new list excluding all the tailing elements of a given list which
|
18 | * satisfy the supplied predicate function. It passes each value from the right
|
19 | * to the supplied predicate function, skipping elements until the predicate
|
20 | * function returns a `falsy` value. The predicate function is applied to one argument:
|
21 | * *(value)*.
|
22 | *
|
23 | * Acts as a transducer if a transformer is given in list position.
|
24 | *
|
25 | * @func
|
26 | * @memberOf R
|
27 | * @since v0.16.0
|
28 | * @category List
|
29 | * @sig (a -> Boolean) -> [a] -> [a]
|
30 | * @sig (a -> Boolean) -> String -> String
|
31 | * @param {Function} predicate The function to be called on each element
|
32 | * @param {Array} xs The collection to iterate over.
|
33 | * @return {Array} A new array without any trailing elements that return `falsy` values from the `predicate`.
|
34 | * @see R.takeLastWhile, R.addIndex, R.drop, R.dropWhile
|
35 | * @example
|
36 | *
|
37 | * const lteThree = x => x <= 3;
|
38 | *
|
39 | * R.dropLastWhile(lteThree, [1, 2, 3, 4, 3, 2, 1]); //=> [1, 2, 3, 4]
|
40 | *
|
41 | * R.dropLastWhile(x => x !== 'd' , 'Ramda'); //=> 'Ramd'
|
42 | */
|
43 |
|
44 |
|
45 | var dropLastWhile =
|
46 | /*#__PURE__*/
|
47 | _curry2(
|
48 | /*#__PURE__*/
|
49 | _dispatchable([], _xdropLastWhile, _dropLastWhile));
|
50 |
|
51 | module.exports = dropLastWhile; |
\ | No newline at end of file |