Show:
Module: _helpers
Parent Module: raska

Handles commom prototype element' tasks

Methods

deconstruct
(
  • basicElementArray
)
String

Defined in src\raska.js:527

Serializes a given _basicElement array to a JSON string

Parameters:

  • basicElementArray _basicElement[][]

    The array of _basicElement we're going to work with

Returns:

String:

The corresponding string

extend
(
  • baseObject
  • impl
  • addNewMembers
)
Object

Defined in src\raska.js:580

Extends any object using a base template object as reference

Parameters:

  • baseObject Object

    The object we whant to copy from

  • impl Object

    The object with the data we want use

  • addNewMembers Bool

    Whether or not we allow new members on the 'impl' object to be used in the result

Returns:

Object:

Extended object

forEach
(
  • arr
  • what
)

Defined in src\raska.js:441

Executes a given delegate for each item in the collection

Parameters:

  • arr Array

    The array that need to be enumerated

  • what Delegate

    What to do to a given item (obj item, number index)

Returns:

Array of data acquired during array enumaration

generateId () String

Defined in src\raska.js:483

Generates a pseudo-random Id

Returns:

String:

A pseudo-random Id

is
(
  • obj
  • what
)
Bool

Defined in src\raska.js:459

Whether or not a given object type is of the type you expect (typeof)

Parameters:

  • obj Object

    The object we whant to know about

  • what String

    The string representing the name of the type

Returns:

Bool:

Whether or not the object matches the specified type

isArray
(
  • obj
)
Bool

Defined in src\raska.js:505

Whether or not a given object is an Array

Parameters:

  • obj Object

    The object we whant to know is it's valid to be handled

Returns:

Bool:

Whether or not the object is valid to be handled

isType
(
  • obj
  • typeName
)
Bool

Defined in src\raska.js:471

Whether or not a given object type is of the type you expect (constructor call)

Parameters:

  • obj Object

    The object we whant to know about

  • typeName String

    The string representing the name of the type

Returns:

Bool:

Whether or not the object matches the specified type

isUndefined
(
  • obj
)
Bool

Defined in src\raska.js:516

Whether or not a given object type is undefined

Parameters:

  • obj Object

    The object we whant to know if it's undefined

Returns:

Bool:

Whether or not the object is undefined

isValid
(
  • obj
)
Bool

Defined in src\raska.js:494

Whether or not a given object type is valid to be handled

Parameters:

  • obj Object

    The object we whant to know if it's valid to be handled

Returns:

Bool:

Whether or not the object is valid to be handled

recreate
(
  • jsonElement
)
_basicElement

Defined in src\raska.js:542

Tries to recreate a previously serialized object into a new raska instance

Parameters:

  • jsonElement JSON

    The JSON representation of a raska object

Returns:

_basicElement:

The recreated element or null if the element type is invalid

recreate ()

Defined in src\raska.js:562

Recreate all links of the object