deno.land / x / rambda@v9.1.1 / src / whereEq.js

نووسراو ببینە
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
import { equals } from './equals.js'import { filter } from './filter.js'
export function whereEq(condition, input){ if (arguments.length === 1){ return _input => whereEq(condition, _input) }
const result = filter((conditionValue, conditionProp) => equals(conditionValue, input[ conditionProp ]), condition)
return Object.keys(result).length === Object.keys(condition).length}
rambda

Version Info

Tagged at
2 months ago