update
This commit is contained in:
parent
d9becc67b6
commit
9308795b8b
964 changed files with 104265 additions and 16 deletions
35
node_modules/ramda/es/propEq.js
generated
vendored
Normal file
35
node_modules/ramda/es/propEq.js
generated
vendored
Normal file
|
@ -0,0 +1,35 @@
|
|||
import _curry3 from "./internal/_curry3.js";
|
||||
import equals from "./equals.js";
|
||||
/**
|
||||
* Returns `true` if the specified object property is equal, in
|
||||
* [`R.equals`](#equals) terms, to the given value; `false` otherwise.
|
||||
* You can test multiple properties with [`R.whereEq`](#whereEq).
|
||||
*
|
||||
* @func
|
||||
* @memberOf R
|
||||
* @since v0.1.0
|
||||
* @category Relation
|
||||
* @sig String -> a -> Object -> Boolean
|
||||
* @param {String} name
|
||||
* @param {*} val
|
||||
* @param {*} obj
|
||||
* @return {Boolean}
|
||||
* @see R.whereEq, R.propSatisfies, R.equals
|
||||
* @example
|
||||
*
|
||||
* const abby = {name: 'Abby', age: 7, hair: 'blond'};
|
||||
* const fred = {name: 'Fred', age: 12, hair: 'brown'};
|
||||
* const rusty = {name: 'Rusty', age: 10, hair: 'brown'};
|
||||
* const alois = {name: 'Alois', age: 15, disposition: 'surly'};
|
||||
* const kids = [abby, fred, rusty, alois];
|
||||
* const hasBrownHair = R.propEq('hair', 'brown');
|
||||
* R.filter(hasBrownHair, kids); //=> [fred, rusty]
|
||||
*/
|
||||
|
||||
var propEq =
|
||||
/*#__PURE__*/
|
||||
_curry3(function propEq(name, val, obj) {
|
||||
return equals(val, obj[name]);
|
||||
});
|
||||
|
||||
export default propEq;
|
Loading…
Add table
Add a link
Reference in a new issue