uneval()

Creates a string representation of the given object or primitive.

This function is valid in v2.13.1 to v2.14.0. This function has been downloaded 25 times.

Parameters

{*} subject
Object or primitive whose string interpretation will be formulated and returned.
{number=} opt_spaceCount Optional
If given and not 0 this causes non-empty objects and/or arrays to be split onto multiple lines and indented by the amount of spaces given here.

Returns

{string}
A string representation of subject.

Required Functions

This function requires the following functions which are 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.
  • entries()
    Gets an array of pairs (array of length 2) indicating all of the keys and values within a given array or object.
  • typeOf()
    Either gets the type of a value or adds a constructor registering its custom type name.
  • isValidVarName()
    Determines if a string can be used as a variable name in JavaScript.
  • indexOf()
    Gets the index of a specified target value in a string, array or an object. Unlike Array.prototype.indexOf(), this function works for finding NaN and differentiates between -0 and 0.