ramda-extension
Version:
Helpful functions built on top of the mighty Ramda
18 lines (17 loc) • 454 B
JavaScript
import { equals, identity, useWith } from 'ramda';
import viewWith from './viewWith';
/**
* Returns true if the given lens equals to given value
*
* @func
* @category Object
* @param {Lens} lens
* @param {*} v value to equal
* @param {*} x
* @return {*}
* @example
*
* R_.viewEq(R.lensIndex(0), 'foo', ['foo', 'bar', 'baz']); //=> true
*/
var viewEq = /*#__PURE__*/useWith(viewWith, [identity, equals, identity]);
export default viewEq;