is

v0.9.6arrow_drop_down
v0.9.6
STATUS
Passing
DOWNLOADS
3
VISIBILITY
Public
PUBLISHED
5 years ago
SIZE
813 B
See if an object (`val`) is an instance of the supplied constructor.
1 contributor
Install is as a package?
Copied
npm i @bit/justin-capalbo.ramda.is
Set Bit as a scoped registryLearn more
npm config set '@bit:registry' https://node.bit.cloud
Component Example
React
React
Vue
Angular
React Native
Add dependency... help_outline
Just
import
any of the 1 million components
and packages in Bit or NPM to the example.
import Button from '@bit/grommet.grommet.button';
import Lodash from 'lodash';
toggle layout
No preview available
modifieddraft
chevron_left
chevron_right
is (
ctor:Object,
val:*
) : Boolean

See if an object (val) is an instance of the supplied constructor. This function will check up the inheritance chain, if any.

Example
R.is(Object, {}); //=> true
     R.is(Number, 1); //=> true
     R.is(Object, 1); //=> false
     R.is(String, 's'); //=> true
     R.is(String, new String('')); //=> true
     R.is(Object, new String('')); //=> true
     R.is(Object, 's'); //=> false
     R.is(Number, {}); //=> false
Arguments
ctor: Object

A constructor

val: *

The value to test

Returns
Boolean

Help and resources