Methods
defineNameProperty(Fn)
Registers getter and setter for .name
property on the given prototype
The default name will be a generated uuid
The setter sets the name once!
Parameters:
Name | Type | Description |
---|---|---|
Fn |
function | The prototype where name will be added |
- Source:
listenersPropagation(Fn, middleware)
Mimics the EventEmitter2 methods and replicates them through custom middlewares it is used to listen on multiple event emitters (tasks) instead of the main one (worker)
Parameters:
Name | Type | Description |
---|---|---|
Fn |
function | The prototype where name will be added |
middleware |
function | The propagation mechanism |
- Source:
readOnly(Fn, key, getter)
registers a readOnly property
Parameters:
Name | Type | Description |
---|---|---|
Fn |
function | |
key |
String | |
getter |
function |
- Source: