How to use the uniqWith function from ramda

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

285
286
287
288
289
290
291
292
293
294
295
    AND ds_properties."publishedAt" IS NOT NULL
  ORDER BY ds_properties."publishedAt", form_fields.order, ds_properties.id
`)
  .then((rows) => (includeForms
    ? rows.map(({ formName, xmlFormId, ...row }) => new Dataset.Property(row, { formName, xmlFormId }))
    : uniqWith(rEquals, rows).map(construct(Dataset.Property))));


// Returns list of Fields augmented by dataset property name.
// This it used by the submission XML parser to create an entity from a submission.
const getFieldsByFormDefId = (formDefId) => ({ all }) => all(sql`
fork icon50
star icon43
watch icon9

+ 59 other calls in file

28
29
30
31
32
33
34
35
36
37
38
	const listOfMonuments = monumentsList(dataPath);
	if (monumentNElement > R.length(listOfMonuments)) {
		throw new Error('monumentListLength is greater than the number of monuments');
	}
	//return a list of random monuments of length monumentListLength all unique
	return R.uniqWith(R.equals, R.times(() => pickRandomFromList(listOfMonuments), monumentNElement*2)).slice(0, monumentNElement);
}


module.exports = {
	randomMonument,
fork icon0
star icon1
watch icon0

14433
14434
14435
14436
14437
14438
14439
14440
14441
* @example
*
*      const strEq = R.eqBy(String);
*      R.uniqWith(strEq)([1, '1', 2, 1]); //=> [1, 2]
*      R.uniqWith(strEq)([{}, {}]);       //=> [{}]
*      R.uniqWith(strEq)([1, '1', 1]);    //=> [1]
*      R.uniqWith(strEq)(['1', 1, 1]);    //=> ['1']
*/

fork icon0
star icon0
watch icon0

+ 15 other calls in file

11363
11364
11365
11366
11367
11368
11369
11370
11371
* @return {Array} The list of unique items.
* @example
*
*      const strEq = R.eqBy(String);
*      R.uniqWith(strEq)([1, '1', 2, 1]); //=> [1, 2]
*      R.uniqWith(strEq)([{}, {}]);       //=> [{}]
*      R.uniqWith(strEq)([1, '1', 1]);    //=> [1]
*      R.uniqWith(strEq)(['1', 1, 1]);    //=> ['1']
*/
fork icon0
star icon0
watch icon0

+ 7 other calls in file

Other functions in ramda

Sorted by popularity

function icon

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