Utils Class
A collection of utility functions
Item Index
Methods
chain_executor
(
-
funcs -
i
Recursive help method for chain_promises
- executes a function that returns a promise (no params allowed)
- chains itself to the success resolve of the promise
Parameters:
-
funcsObjectis an array of functions returning promises
-
iObjectis the current working index
chain_promises
(
Promise
-
funcs
chains a list of functions (that return promises) and executes them in the right order [function() {return Promise.resolve();}, function() {return Promise.resolve();}]
Parameters:
-
funcsObjectis an array of functions returning promises
Returns:
Promise:
hash_of_file_content
(
String | Null
-
file_path
SHA1 of the file
Parameters:
-
file_pathString
Returns:
String | Null:
hash_xml_fragment
(
String | Null
-
fragment_id
SHA1 of the xml file
Parameters:
-
fragment_idNumber
Returns:
String | Null:
remove_image
(
Number
-
file_path
Delete image from disk
Parameters:
-
file_pathString
Returns:
Number:
return_code
token_type_mapping
(
String
-
token_type
Differentiates between Token and Group
Parameters:
-
token_typeString
Returns:
String:
