new UserData(data)
Create a UserData instance
Parameters:
Name | Type | Description |
---|---|---|
data |
object | user data object |
Methods
-
<static> equals(a, b)
-
Check equality of two user data objects
Parameters:
Name Type Description a
* First user data object or UserData instance
b
* Second user data object or UserData instance
Returns:
true if objects are equal
- Type
- boolean
-
get()
-
Return user data property value
Returns:
- Type
- * | null
-
setProp(prop, value)
-
Set user data property
Parameters:
Name Type Description prop
string user data property key
value
* property property value
Returns:
current UserData instance
- Type
- UserData
-
setProps(props)
-
Set user data properties
Parameters:
Name Type Description props
object user data object
Returns:
current UserData instance
- Type
- UserData
-
setToSession()
-
Set user data property to session