Skip to main content
Module

x/ramda/propIs.js

:ram: Practical functional Javascript
Very Popular
Go to Latest
File
import _curry3 from './internal/_curry3';import is from './is';

/** * Returns `true` if the specified object property is of the given type; * `false` otherwise. * * @func * @memberOf R * @since v0.16.0 * @category Type * @sig Type -> String -> Object -> Boolean * @param {Function} type * @param {String} name * @param {*} obj * @return {Boolean} * @see R.is, R.propSatisfies * @example * * R.propIs(Number, 'x', {x: 1, y: 2}); //=> true * R.propIs(Number, 'x', {x: 'foo'}); //=> false * R.propIs(Number, 'x', {}); //=> false */var propIs = _curry3(function propIs(type, name, obj) { return is(type, obj[name]);});export default propIs;