testAt()

Tests a given path under the given root object and returns the values at each step of that path.

This function is valid in v2.8.0 to v2.12.0. This function has been downloaded 13 times.

Parameters

{*} root
Object to start at as the root of the proposed path.
{Array} path
An array of strings and/or numbers that represent the path to be tested under root.

Returns

{Array}
An array having a length less than or equal to that of path where each will be the value for the corresponding path value.

Required Function

This function requires the following function which is included automatically:

  • 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.