$obj
Handles commom prototype element' tasks
Table of Contents
Methods
deconstruct
-
basicElementArray
Serializes a given _basicElement array to a JSON string
Parameters:
-
basicElementArray
_basicElement[][]The array of _basicElement we're going to work with
Returns:
The corresponding string
extend
-
baseObject
-
impl
-
addNewMembers
Extends any object using a base template object as reference
Parameters:
-
baseObject
ObjectThe object we whant to copy from
-
impl
ObjectThe object with the data we want use
-
addNewMembers
BoolWhether or not we allow new members on the 'impl' object to be used in the result
Returns:
Extended object
forEach
-
arr
-
what
Executes a given delegate for each item in the collection
Parameters:
-
arr
ArrayThe array that need to be enumerated
-
what
DelegateWhat to do to a given item (obj item, number index)
Returns:
Array of data acquired during array enumaration
generateId
()
String
Generates a pseudo-random Id
Returns:
A pseudo-random Id
is
-
obj
-
what
Whether or not a given object type is of the type you expect (typeof)
Parameters:
-
obj
ObjectThe object we whant to know about
-
what
StringThe string representing the name of the type
Returns:
Whether or not the object matches the specified type
isArray
-
obj
Whether or not a given object is an Array
Parameters:
-
obj
ObjectThe object we whant to know is it's valid to be handled
Returns:
Whether or not the object is valid to be handled
isType
-
obj
-
typeName
Whether or not a given object type is of the type you expect (constructor call)
Parameters:
-
obj
ObjectThe object we whant to know about
-
typeName
StringThe string representing the name of the type
Returns:
Whether or not the object matches the specified type
isUndefined
-
obj
Whether or not a given object type is undefined
Parameters:
-
obj
ObjectThe object we whant to know if it's undefined
Returns:
Whether or not the object is undefined
isValid
-
obj
Whether or not a given object type is valid to be handled
Parameters:
-
obj
ObjectThe object we whant to know if it's valid to be handled
Returns:
Whether or not the object is valid to be handled
Tries to recreate a previously serialized object into a new raska instance
Parameters:
-
jsonElement
JSONThe JSON representation of a raska object
Returns:
The recreated element or null if the element type is invalid
recreate
()
Recreate all links of the object