Share your code. Components are building blocks, you are the architect.

utils/is
v1.1.0
1.1.0
1.0.0
MIT
PUBLIC
3
1     DEPENDENCIES
Build: fail
BuildFail
Build Status: fail
See if an object (`val`) is an instance of the supplied constructor

Please configure Bit as a scoped registry to install components with NPM.Learn more

npm config set '@bit:registry' https://node.bitsrc.io
Use utils/is in your project
npm i @bit/bit.ramda.utils.is
Copied

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