API Docs for: 1.0.0
Show:

Utils Class

Defined in: src\utils.js:1

A collection of utility functions

Methods

chain_executor

(
  • funcs
  • i
)

Defined in src\utils.js:104

Recursive help method for chain_promises

  1. executes a function that returns a promise (no params allowed)
  2. chains itself to the success resolve of the promise

Parameters:

  • funcs Object

    is an array of functions returning promises

  • i Object

    is the current working index

chain_promises

(
  • funcs
)
Promise

Defined in src\utils.js:88

chains a list of functions (that return promises) and executes them in the right order [function() {return Promise.resolve();}, function() {return Promise.resolve();}]

Parameters:

  • funcs Object

    is an array of functions returning promises

Returns:

Promise:

hash_of_file_content

(
  • file_path
)
String | Null

Defined in src\utils.js:32

SHA1 of the file

Parameters:

  • file_path String

Returns:

String | Null:

hash_xml_fragment

(
  • fragment_id
)
String | Null

Defined in src\utils.js:48

SHA1 of the xml file

Parameters:

  • fragment_id Number

Returns:

String | Null:

remove_image

(
  • file_path
)
Number

Defined in src\utils.js:59

Delete image from disk

Parameters:

  • file_path String

Returns:

Number:

return_code

token_type_mapping

(
  • token_type
)
String

Defined in src\utils.js:70

Differentiates between Token and Group

Parameters:

  • token_type String

Returns:

String: