Methods

(inner) getAllowPassthrough() → {boolean}

Get passthorugh allowed or not in converter configuration.

Returns:
  • whether passthrough is allowed or not.

    Type: 
    boolean
  • true = non-recognized formula will be passed through.

  • false = non-recognized formula will retrun error.

(inner) getCustomAPIDef() → {array}

Get custom API definition JSON array.

Returns:

custom API definition JSON array.

Type: 
array

(inner) getNativeness(formula) → {boolean}

Get whether registered formula converted to native or not

Parameters:
NameTypeDescription
formulastring

the formula name to check. ('if', 'true', 'false', 'length')

Returns:

whether formula is converted to native or not. For example, if getNativeness('if') true then, formula '@If' will be converted to 'if' instead of 'rosettajs.Logical.if'.

Type: 
boolean

(inner) getParamAsFieldName() → {boolean}

Get paramAsFieldName setting in converter configuration.

Returns:
  • whether paramAsFieldName is allowed or not.

    Type: 
    boolean
  • true = treat undefined parameter as field name and convert to getField.

  • false = treat undefined parameter as variable name.

(inner) getReturnFinal() → {boolean}

Get return final statement or not in converter configuration.

Returns:
  • whether to return final statement or not.

    Type: 
    boolean
  • true = final statement will return.

  • false = no return statement.

(inner) getRosettaGateHost() → {string}

Get rosetta gate url for converter to use.

Returns:

the rosetta host url string currently set.

Type: 
string

(inner) getRosettaJSname() → {string}

Get rosettajs name for converter to use.

Returns:

the default rosettajs object name string currently set.

Type: 
string

(inner) getStripNumbers() → {boolean}

Get stripNumbers setting in converter configuration.

Returns:
  • whether stripNumbers is allowed or not.

    Type: 
    boolean
  • true = leading 0 on the number literal will be stripped.

  • false = leading 0 on the number literal will not be stripped.

(inner) setAllowPassthrough(allow) → {boolean}

Set passthorugh allowed or not in converter configuration.

Parameters:
NameTypeDescription
allowboolean

whether passthrough is allowed or not.

Returns:

setting updated in converter configuration.

Type: 
boolean

(inner) setCustomAPIDef(custom) → {array}

Set custom API definition JSON array

Parameters:
NameTypeDescription
customarray

custom API definition JSON array to set.

Returns:

custom API definition JSON array in converter configuration.

Type: 
array

(inner) setNativeness(formula, native) → {boolean}

Set registered formula converted to native or not

Parameters:
NameTypeDescription
formulastring

the formula name to set. ('if', 'true', 'false', 'length')

nativeboolean

to set whether formula is converted to native or not.

Returns:

setting updated in converter configuration.

Type: 
boolean

(inner) setParamAsFieldName(convert) → {boolean}

Set whether parameter will be converted to getField or not.

Parameters:
NameTypeDescription
convertboolean

whether paramAsFieldName is allowed or not.

Returns:

setting updated in converter configuration.

Type: 
boolean

(inner) setReturnFinal(whether) → {boolean}

Set return final statement or not in converter configuration.

Parameters:
NameTypeDescription
whetherboolean

to return final statement or not.

Returns:

setting updated in converter configuration.

Type: 
boolean

(inner) setRosettaGateHost(_rosettaGateHost) → {string}

Set rosetta gate url for converter to use.

Parameters:
NameTypeDescription
_rosettaGateHoststring

rosetta gate url string to set.

Returns:

the rosetta host url string currently set.

Type: 
string

(inner) setRosettaJSname(_rosettajs) → {string}

Set rosettajs name for converter to use.

Parameters:
NameTypeDescription
_rosettajsstring

the default rosettajs object name string to set.

Returns:

the default rosettajs object name string currently set.

Type: 
string

(inner) setStripNumbers(strip) → {boolean}

Set stripNumbers to strip leading 0 on the number literal or not in converter configuration.

Parameters:
NameTypeDescription
stripboolean

whether stripNumbers is allowed or not.

Returns:

setting updated in converter configuration.

Type: 
boolean