How to use the min function from ramda

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

0
1
2
3
4
5
6
7
8
9
10
11
const gcm = require('node-gcm');
const R = require('ramda');
const { DEFAULT_TTL, GCM_METHOD, GCM_MAX_TTL } = require('./constants');


const ttlFromExpiry = R.compose(
  R.min(GCM_MAX_TTL),
  (expiry) => expiry - Math.floor(Date.now() / 1000)
);


const extractTimeToLive = R.cond([
fork icon117
star icon518
watch icon0

3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
 * @param {*} b
 * @return {*}
 * @see R.minBy, R.max
 * @example
 *
 *      R.min(789, 123); //=> 123
 *      R.min('a', 'b'); //=> 'a'
 */
var min = _curry2(function min(a, b) {
    return b < a ? b : a;
fork icon0
star icon0
watch icon0

+ 35 other calls in file

26
27
28
29
30
31
32
33
34
35
36
37
38
    die += 3;


    if (p2Score >= 1000) break;
  }


  return R.min(p1Score, p2Score) * (die - 1);
};


console.log(deterministicGame(startPos));

fork icon0
star icon0
watch icon0

+ 6 other calls in file

Other functions in ramda

Sorted by popularity

function icon

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