jsbeans

jsbeans  1.0.0

jsbeans > jsbeans > jsbeans.Object
Search:
 
Filters

static Class jsbeans.Object

A collection of utilities for managing javascript Objects both custom or native.

Methods

after

static void after ( instance , name , handler , [args] )
Intercepts a method and invokes a handler after its execution.
Arguments remains untouched for the original method, while the {@param} handler takes {@param} args.
Parameters:
instance <Object> the variable containing the reference to the instance of an Object
name <String> the name of the method to be wrapped
handler <Function> the function fired after method named as name
[args] <Object> optional arguments for the handler
Returns: void

afterThrowing

static void afterThrowing ( instance , name , handler , [args] )
Intercepts an error thrown by a method and invokes a handler after its execution.
Arguments remains untouched for the original method, while the {@param} handler takes {@param} args.
Parameters:
instance <Object> the variable containing the reference to the instance of an Object
name <String> the name of the method to be wrapped
handler <Function> the function fired after method named as name has thrown an error
[args] <Object> optional arguments for the handler
Returns: void

before

static void before ( instance , name , handler , [args] )
Intercepts a method and invokes a handler before its execution.
Arguments remains untouched for the original method, while the {@param} handler takes {@param} args.
Parameters:
instance <Object> the variable containing the reference to the instance of an Object
name <String> the name of the method to be wrapped
handler <Function> the function fired before method named as name
[args] <Object> optional arguments for the handler
Returns: void

isDef

static void isDef ( )
Shorten alias for isDefined
Returns: void

isDefined

static boolean isDefined ( arguments )
Returns false at first undefined Object passed as argument.
For a deeper check against undefined and null use isDefOrNull
Parameters:
arguments <Object> Uses the native arguments list.
Returns: boolean
false if at least one argument is undefined checked with native typeof operator. If no argument is passed it returns true.

isDefinedOrNull

static boolean isDefinedOrNull ( arguments )
Returns false at first undefined or null Object passed as argument.
If no arguments is passed it returns false
Parameters:
arguments <Object> Uses the native arguments list.
Returns: boolean
false if at least one argument is undefined (checked with native typeof operator) or null. If no argument is passed it returns false.

isDefOrNull

static void isDefOrNull ( )
Shorten alias for isDefinedOrNull
Returns: void

override

static void override ( instance , name , handler , [args] )
Intercepts a method and invokes a handler instead of its execution.
The {@param} handler takes {@param} args as arguments.
Parameters:
instance <Object> the variable containing the reference to the instance of an Object
name <String> the name of the method to be overridden
handler <Function> the function fired instead method named as name
[args] <Object> optional arguments for the handler
Returns: void


Copyright © 2016 Francesco Mele. All rights reserved.