set()

Set the value of a property on an object.

This function is valid in v2.17.0 to v2.20.0. This function has been downloaded 12 times.

Parameters

{*|undefined} obj
Object whose property will be set.
{string=} opt_name Optional, Default:undefined
Name of the property to be set.
{*=} opt_value Optional
Value to which the property will be set.
{boolean=} opt_returnObj Optional, Default:false
If this is true-ish and a partial value is not to be returned then obj will be returned.

Returns

{*}
If the first 3 arguments are given the previous property value will be returned unless opt_returnObj is true-ish in which case obj will be returned. If one or more arguments are missing a partial function will be returned that will accept the remaining arguments. The value of opt_returnObj will be ignored for partial functions.