Methods
(static) countLineNumbers(text) → {*}
Returns how many lines exist in the text passed.
Parameters:
Name | Type | Description |
---|---|---|
text |
Returns:
- Type
- *
(static) createCapabilityFunctionString(capability) → {string}
Returns the function call for the capability, ready to be pasted into an editor.
Parameters:
Name | Type | Description |
---|---|---|
capability |
Returns:
- Type
- string
(static) createCapabilityParameterString(capability) → {string}
Creates a string of a sample parameter object for a given capability. Uses default values wherever possible.
Parameters:
Name | Type | Description |
---|---|---|
capability |
Returns:
- Type
- string
(static) createVariableGetFunctionString(variable) → {string}
Create the string to be pasted into the editor to get a process variable.
Parameters:
Name | Type | Description |
---|---|---|
variable |
Returns:
- Type
- string
(static) createVariableSetFunctionString(variable) → {string}
Create the string to be pasted into the editor to set a process variable.
Parameters:
Name | Type | Description |
---|---|---|
variable |
Returns:
- Type
- string
(static) debounce(func, wait, immediate) → {function}
Returns a function, that, as long as it continues to be invoked, will not
be triggered. The function will be called after it stops being called for
N milliseconds. If immediate
is passed, trigger the function on the
leading edge, instead of the trailing.
Taken from UnderscoreJS, modified slightly.
Parameters:
Name | Type | Description |
---|---|---|
func |
||
wait |
||
immediate |
Returns:
- Type
- function
(static) findCapabilitiesByName(capabilities, name) → {*}
Returns the capability element which matches either the name or the schema URI.
Parameters:
Name | Type | Description |
---|---|---|
capabilities |
||
name |
Returns:
- Type
- *
(static) hasNextCall(code)
Check if the code has a "next()" function call.
Parameters:
Name | Type | Description |
---|---|---|
code |
Returns:
Boolean
(static) isCapabilitySuitableForParameters(capability:, parameters:)
Checks if the given set of parameters satisfies a capability.
Parameters:
Name | Type | Description |
---|---|---|
capability: |
object describing capability |
|
parameters: |
array of strings of parameter names |
Returns:
boolean
(static) parseCapabilitiesFromCode(code) → {Array}
Parse the javascript code to find out which capabilites are being used.
Parameters:
Name | Type | Description |
---|---|---|
code |
Returns:
- Type
- Array
(static) parseParamString(paramString) → {Array}
Parses a parameter string and returns an array of parameter names.
Parameters:
Name | Type | Description |
---|---|---|
paramString |
Returns:
- Type
- Array
(inner) getSingleParameterString(capability)
Help function to create a string of a single parameter
Parameters:
Name | Type | Description |
---|---|---|
capability |
* |
(inner) isServiceAdded()
is there a getService('{service}') in the code