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

utils/has-in
v1.1.0
1.1.0
1.0.0
MIT
PUBLIC
3
1     DEPENDENCIES
Build: fail
BuildFail
Build Status: fail
Returns whether or not an object or its prototype chain has a property with

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/has-in in your project
npm i @bit/bit.ramda.utils.has-in
Copied

hasIn (prop:String, obj:Object) : Boolean

Returns whether or not an object or its prototype chain has a property with the specified name

Example

function Rectangle(width, height) {
       this.width = width;
       this.height = height;
     }
     Rectangle.prototype.area = function() {
       return this.width * this.height;
     };

     var square = new Rectangle(2, 2);
     R.hasIn('width', square);  //=> true
     R.hasIn('area', square);  //=> true

Arguments

prop: String

The name of the property to check for.

obj: Object

The object to query.

Returns

Boolean

Whether the property exists.