How to use the anyPass function from ramda
Find comprehensive JavaScript ramda.anyPass code examples handpicked from public code repositorys.
26 27 28 29 30 31 32 33 34 35 36 37 38
const hash = obj => sha1(JSON.stringify(obj)) function pathsHaveData (list, obj) { let pred = R.pathSatisfies(R.anyPass([R.isNil, R.isEmpty])) pred = R.anyPass(R.map(pred, list)) return !pred(obj) } const hasData = (list, obj) => pathsHaveData(R.map(x => [x], list), obj)
16
5
0
+ 2 other calls in file
GitHub: alvaro-cuesta/aoc-js
12 13 14 15 16 17 18 19 20 21 22
return false } } }) const isVisible = R.anyPass([ isVisibleDir([0, 1]), isVisibleDir([0, -1]), isVisibleDir([1, 0]), isVisibleDir([-1, 0]),
0
1
0
22 23 24 25 26 27 28 29 30 31 32
} return table } // Checks for enums const ownerTypeValid = anyPass([ propEq('ownerType', 'user'), propEq('ownerType', 'team'), propEq('ownerType', 'org') ])
0
1
0
+ 2 other calls in file
6910 6911 6912 6913 6914 6915 6916 6917 6918 6919
* @since v0.9.0 * @category Logic * @sig [(*... -> Boolean)] -> (*... -> Boolean) * @param {Array} preds * @return {Function} * @see R.anyPass * @example * * var isQueen = R.propEq('rank', 'Q'); * var isSpade = R.propEq('suit', '♠︎');
0
0
0
+ 35 other calls in file
12 13 14 15 16 17 18 19 20 21 22 23
: { errors: [], valid: true }, R.filter(([key, { fn }]) => fn ? !fn(data[key]) : false), R.toPairs, )(pattern); const or = R.anyPass; const and = R.allPass; const then = fn => p => p.then(fn);
0
0
0
+ 3 other calls in file
48 49 50 51 52 53 54 55 56 57 58 59
// const extractTransferDisplayName = R.propEq('displayName', configDisplayName) // return R.prop('name', R.find(extractTransferDisplayName, configList)) // } const extractTransferConfig = (configNameList) => (configObj) => { return R.anyPass(R.map(R.propEq('displayName'), configNameList))(configObj) //return R.find(extractTransferDisplayName, configObj) } const buildTransferConfig = (queryConfigMap) => (queryName) => {
0
0
0
676 677 678 679 680 681 682 683 684 685
* @see R.allPass * @example * * const isClub = R.propEq('suit', '♣'); * const isSpade = R.propEq('suit', '♠'); * const isBlackCard = R.anyPass([isClub, isSpade]); * * isBlackCard({rank: '10', suit: '♣'}); //=> true * isBlackCard({rank: 'Q', suit: '♠'}); //=> true * isBlackCard({rank: 'Q', suit: '♦'}); //=> false
0
0
2
+ 7 other calls in file
ramda.clone is the most popular function in ramda (30311 examples)