setNS()

Tries to set a value at the given namespace under the given root object.

This function is valid in v2.6.0 to v2.7.0. This function has been downloaded 0 times.

Parameters

{*} root
Object to start at as the root of the proposed namespace.
{Array} namespace
An array of strings and/or numbers that represent the namespace chain to be traversed under root.
{*} value
The value to be assigned under the specified namespace within the root object.

Returns

{boolean}
true if value is successfully set under the given namespace, otherwise false.

Required Functions

This function directly requires the following functions which are included automatically:

  • isPrimitive()
    Determines if something is a primitive or not. If not a primitive it must be some form of object.
  • testNS()
    Tests a given namespace under the given root object and returns the values at each step of that namespace.