has()

Every object descended from Object inherits the hasOwnProperty method. This method can be used to determine whether an object has the specified property as a direct property of that object; unlike the in operator, this method does not check down the object's prototype chain.

This function is valid in v2.0.0 to v2.14.0. This function has been downloaded 48 times.

Parameters

{Object} obj
Object whose property will be tested.
{string} name
Name of the property to test.

Returns

{boolean}
A boolean indicating whether the object has the specified property as own (not inherited) property.

Required Function

This function requires the following function which is included automatically:

  • alias()
    Binds a context to a given function within that context.