main
Last change
on this file since 65b6638 was d24f17c, checked in by Aleksandar Panovski <apano77@…>, 15 months ago |
Initial commit
|
-
Property mode
set to
100644
|
File size:
805 bytes
|
Line | |
---|
1 | var _curry3 =
|
---|
2 | /*#__PURE__*/
|
---|
3 | require("./internal/_curry3.js");
|
---|
4 |
|
---|
5 | var prop =
|
---|
6 | /*#__PURE__*/
|
---|
7 | require("./prop.js");
|
---|
8 |
|
---|
9 | var is =
|
---|
10 | /*#__PURE__*/
|
---|
11 | require("./is.js");
|
---|
12 | /**
|
---|
13 | * Returns `true` if the specified object property is of the given type;
|
---|
14 | * `false` otherwise.
|
---|
15 | *
|
---|
16 | * @func
|
---|
17 | * @memberOf R
|
---|
18 | * @since v0.16.0
|
---|
19 | * @category Type
|
---|
20 | * @sig Type -> String -> Object -> Boolean
|
---|
21 | * @param {Function} type
|
---|
22 | * @param {String} name
|
---|
23 | * @param {*} obj
|
---|
24 | * @return {Boolean}
|
---|
25 | * @see R.is, R.propSatisfies
|
---|
26 | * @example
|
---|
27 | *
|
---|
28 | * R.propIs(Number, 'x', {x: 1, y: 2}); //=> true
|
---|
29 | * R.propIs(Number, 'x', {x: 'foo'}); //=> false
|
---|
30 | * R.propIs(Number, 'x', {}); //=> false
|
---|
31 | */
|
---|
32 |
|
---|
33 |
|
---|
34 | var propIs =
|
---|
35 | /*#__PURE__*/
|
---|
36 | _curry3(function propIs(type, name, obj) {
|
---|
37 | return is(type, prop(name, obj));
|
---|
38 | });
|
---|
39 |
|
---|
40 | module.exports = propIs; |
---|
Note:
See
TracBrowser
for help on using the repository browser.