How to use the propSatisfies function from ramda

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

40
41
42
43
44
45
46
47
48
49

/**
 * Appends authorization header when supplied with "user" option.
 */
const coerceUserOption = R.when(
  R.propSatisfies(R.complement(R.isNil), 'user'),
  R.compose(
    R.dissoc('user'),
    R.over(
      R.lens(updateHeaderWithUser, R.assoc('header')),
fork icon303
star icon0
watch icon2

+ 3 other calls in file

14
15
16
17
18
19
20
21
22
23
24
25
    getPaths(isPostCSSOptions, config),
    config
  )


// bug in 'stylelint-custom-processor-loader' configPath resolution
const isESLintLoader = both(prop('loader'), propSatisfies(includes('eslint-loader'), 'loader'))


const addStylelintCustomProcessorLoader = path => config =>
  edit(
    prepend({
fork icon2
star icon5
watch icon0

3789
3790
3791
3792
3793
3794
3795
3796
3797
3798
 * @param {*} obj
 * @return {Boolean}
 * @see R.propEq, R.propIs
 * @example
 *
 *      R.propSatisfies(x => x > 0, 'x', {x: 1, y: 2}); //=> true
 */
var propSatisfies = _curry3(function propSatisfies(pred, name, obj) {
    return pred(obj[name]);
});
fork icon0
star icon0
watch icon0

+ 35 other calls in file

19
20
21
22
23
24
25
26
27
28
29
30
]);


const validateMXRecord = type => and([
  R.propIs(Array, type),
  R.propSatisfies(withLengthGte(1), type),
  R.propSatisfies(R.all(isValidDomain), type),
]);


const checkRestrictedNames = R.complement(R.includes(R.__, INVALID_NAMES))

fork icon0
star icon0
watch icon0

+ 13 other calls in file

Other functions in ramda

Sorted by popularity

function icon

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