How to use the props function from ramda

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

95
96
97
98
99
100
101
102
103
104
  return escaped;
};

const vals = R.map(
  R.pipe(
    R.props(keys),
    R.map(escapeValue),
    R.join(',')
  )
)(toInsert);
fork icon1
star icon6
watch icon0

+ 3 other calls in file

18
19
20
21
22
23
24
25
26
27
var liftN = _require2.liftN;
var curry = _require2.curry;
var pipe = _require2.pipe;
var always = _require2.always;
var merge = _require2.merge;
var props = _require2.props;
var apply = _require2.apply;
var identity = _require2.identity;
var unapply = _require2.unapply;
var zipObj = _require2.zipObj;
fork icon1
star icon3
watch icon3

55
56
57
58
59
60
61
62
63
64
  R.map(
    R.pipe(
      ([key, value]) =>
        createRelativePackagePath(relativePath + "node_modules/")(key),
      unsafeReadFileJson,
      R.props(["version", "license", "homepage"])
    )
  )
)(dependencies);

fork icon0
star icon1
watch icon0

41
42
43
44
45
46
47
48
49
50
51
                                                  )


const takeSpecificGen     = (matrix,
                             genAmount,
                             matrixMark
                            )           => R.props(
                                                   L.generate(R.identity).dropWhile(x => x < matrixMark).take(genAmount).toArray(),
                                                   matrix
                                                  )

fork icon0
star icon0
watch icon0

1
2
3
4
5
6
7
8
9
10
11
12


const getMidIndex = R.compose(
  R.call(R.invoker(1, "floor"), R.__, Math),
  R.divide(R.__, 2),
  R.apply(R.add),
  R.props(["upper", "lower"])
);


const getMidElement = R.converge(R.nth, [getMidIndex, R.prop("list")]);
const getSearchValue = R.prop("searchValue");
fork icon0
star icon0
watch icon0

3809
3810
3811
3812
3813
3814
3815
3816
3817
3818
* @param {Array} ps The property names to fetch
* @param {Object} obj The object to query
* @return {Array} The corresponding values or partially applied function.
* @example
*
*      R.props(['x', 'y'], {x: 1, y: 2}); //=> [1, 2]
*      R.props(['c', 'a', 'b'], {b: 2, a: 1}); //=> [undefined, 1, 2]
*
*      var fullName = R.compose(R.join(' '), R.props(['first', 'last']));
*      fullName({last: 'Bullet-Tooth', age: 33, first: 'Tony'}); //=> 'Tony Bullet-Tooth'
fork icon0
star icon0
watch icon0

+ 53 other calls in file

Other functions in ramda

Sorted by popularity

function icon

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