How to use the mergeWith function from ramda

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

62
63
64
65
66
67
68
69
  ],
};


const config = ENV === 'production' ? prod : devel;


module.exports = mergeWith(concat, base, config);
fork icon1
star icon13
watch icon0

33
34
35
36
37
38
39
40
41
42
43
44
45
const loadCreatorAndApplyArgs = ([creator, ...args]) => normalizeLoaded(creator)(...args)


const normalize = r => (type(r) === 'Array' ? loadCreatorAndApplyArgs(r) : normalizeLoaded(r))


const mergePipes = reduceRight(
  mergeWith((x, y) => flatten([x, y])),
  {}
)


const isolate = (scope, o) =>
fork icon2
star icon5
watch icon0

6318
6319
6320
6321
6322
6323
6324
6325
6326
6327
* @param {Object} r
* @return {Object}
* @see R.merge, R.mergeWithKey
* @example
*
*      R.mergeWith(R.concat,
*                  { a: true, values: [10, 20] },
*                  { b: true, values: [15, 35] });
*      //=> { a: true, b: true, values: [10, 20, 15, 35] }
*/
fork icon0
star icon0
watch icon0

+ 17 other calls in file

3
4
5
6
7
8
9
10
11
12
13
14
const tmp = require('tmp');
const { render } = require('prettyjson');


const gatherCounts = (stream) => stream
  .map(R.prop('counts'))
  .reduce({}, R.mergeWith(R.add))
  .toPromise(Promise);


const writeDevNull = R.curry((successResult, stream) => new Promise((resolve) => {

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)