How to use the dropWhile function from ramda

Find comprehensive JavaScript ramda.dropWhile code examples handpicked from public code repositorys.

27
28
29
30
31
32
33
34
35
36
37
      R.map(Number),
      takeFirstAndLast
    )
  ]), 
  R.drop(1), 
  R.dropWhile(R.complement(R.equals('=')))
)


const isTest = checkHead('Test')
const parseTest = R.compose(
fork icon0
star icon0
watch icon0

+ 3 other calls in file

54
55
56
57
58
59
60
61
62
63
    const pred = (c) => c === stripChar;
    return R.pipe(
    //Convert to list of chars
    (s) => [...s], 
    //Remove trailing stripChars on both sides
    R.dropWhile(pred), R.dropLastWhile(pred), 
    //Recombine
    R.reduce((acc, elem) => acc + elem, ''))(str);
};
exports.strip = strip;
fork icon0
star icon0
watch icon0

+ 2 other calls in file

1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
 * @see R.takeWhile, R.transduce, R.addIndex
 * @example
 *
 *      var lteTwo = x => x <= 2;
 *
 *      R.dropWhile(lteTwo, [1, 2, 3, 4, 3, 2, 1]); //=> [3, 4, 3, 2, 1]
 */
var dropWhile = _curry2(_dispatchable('dropWhile', _xdropWhile, function dropWhile(pred, list) {
    var idx = 0;
    var len = list.length;
fork icon0
star icon0
watch icon0

+ 17 other calls in file

2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
 *
 *      const lteTwo = x => x <= 2;
 *
 *      R.dropWhile(lteTwo, [1, 2, 3, 4, 3, 2, 1]); //=> [3, 4, 3, 2, 1]
 *
 *      R.dropWhile(x => x !== 'd' , 'Ramda'); //=> 'da'
 */




var dropWhile =
fork icon0
star icon0
watch icon2

+ 7 other calls in file

23
24
25
26
27
28
29
30
31
32
const ensureAbsolutePath = compose(
  // Append slash at the beginning
  concat('/'),
  // Remove any leading slashes
  // @ts-ignore
  dropWhile(equalsSlash),
  // Remove trailing slashes
  dropLastWhile(equalsSlash),
  trim,
  String
fork icon0
star icon0
watch icon0

Other functions in ramda

Sorted by popularity

function icon

ramda.clone is the most popular function in ramda (30311 examples)