new Mixin()
Static helper class to mix objects
Methods
-
<static> mergeFunction(dest, source)
-
Combine functions in one. Result from source function will be returned and it will be executed first.
Parameters:
Name Type Description destfunction new function sourcefunction source function that will be used to return result Returns:
combined function- Type
- function
-
<static> mix(objects)
-
Merges all objects into first object. It will merge functions, properties, getters,setters
Parameters:
Name Type Argument Description objectsobject <repeatable>
to merge Returns:
merged object- Type
- object
-
<static> mixFunction(parentFunc, childFunc)
-
Merges functions if they are not the same and if both params are functions
Parameters:
Name Type Description parentFunc* source function childFunc* new function Returns:
merged function- Type
- *
-
<static> updateParentFunc(parent, child, funcName, newFunc, childFirst)
-
Checks if parent has function and merges it with child function if needed
Parameters:
Name Type Description parentobject parent object childobject child object funcNamestring name of function newFuncfunction new function childFirstboolean indicates if new function should be called before parent function Returns:
returns self for chaining- Type
- coreutils.Mixin