How to use the contains function from ramda
Find comprehensive JavaScript ramda.contains code examples handpicked from public code repositorys.
GitHub: leslie555/bsp
146 147 148 149 150 151 152 153 154 155 156
* 值数组是否包含 某特定值 * arr [''] */ export function isArrayHave(x, arr) { return R.contains(x, arr); } /** * 对象数组是否包含 某特定对象属性值
1
0
0
GitHub: muqsitnawaz/deepcoin
228 229 230 231 232 233 234 235 236
return R.map( R.pipe( R.prop('transactions'), R.map(R.pipe( R.path(['data', 'inputs']), R.contains({ transaction: txInput.transaction, index: txInput.index }) )) ), referenceBlockchain); }, transaction.data.inputs)));
0
1
0
8002 8003 8004 8005 8006 8007 8008 8009 8010 8011
* @param {Array} list The array to consider. * @return {Boolean} `true` if the item is in the list, `false` otherwise. * @see R.any * @example * * R.contains(3, [1, 2, 3]); //=> true * R.contains(4, [1, 2, 3]); //=> false * R.contains([42], [[42]]); //=> true */ var contains = _curry2(_contains);
0
0
0
+ 53 other calls in file
2066 2067 2068 2069 2070 2071 2072 2073 2074
* @deprecated since v0.26.0 * @example * * R.contains(3, [1, 2, 3]); //=> true * R.contains(4, [1, 2, 3]); //=> false * R.contains({ name: 'Fred' }, [{ name: 'Fred' }]); //=> true * R.contains([42], [[42]]); //=> true * R.contains('ba', 'banana'); //=>true */
0
0
2
+ 19 other calls in file
GitHub: octachrome/t2
118 119 120 121 122 123 124 125 126 127 128 129 130
]); const Executor = {}; Executor.assertAvailable = (action, game) => R.contains(action, Action.listAvailable(game)) || raiseError(`Action ${action.action} is not available in state ${State.getId(game)}`); Executor.claimAction = action => R.set(State.lens, R.mergeLeft(action, {id: State.ACTION_RESPONSE}));
0
0
0
+ 3 other calls in file
84 85 86 87 88 89 90 91 92 93
const { currentTags } = action.payload let allEvents = state.events const getTagForEvent = R.path(["SecondaryTag", "Title"]) const filterWithTags = tags => event => R.contains(getTagForEvent(event), tags) const forData = tags => R.filter(filterWithTags(tags)) const forDay = tags => R.map(forData(tags)) const forMonth = tags => R.map(forDay(tags)) const forYear = tags => R.map(forMonth(tags))
0
0
0
ramda.clone is the most popular function in ramda (30311 examples)