Global

Members

JSON

JSON parser.
License:
  • Public-Domain
See:

seedRandom

Adds a new Math.seedRandom() method, used as a workaround for a bug in Math.random() with After Effects on Mac OS
Author:
  • David Bau
License:
  • MIT

Methods

def(val, defaultVal){object}

D:/DEV_SRC/RxOT/DuPSF/tools/output/DuPSF.jsxinc, line 340
Assigns a default value to a var if it's undefined.
Name Type Description
val object The variable to set
defaultVal object The default value
Returns:
Type Description
object The var
Example
foo = def( foo, 12 ); // if foo was undefined, it is now 12, else it's unchanged.

jstype(exp){string}

D:/DEV_SRC/RxOT/DuPSF/tools/output/DuPSF.jsxinc, line 351
Improved typeof which returns the type of object instead of 'object'
Name Type Description
exp any The expression to check.
Returns:
Type Description
string The type always in lower case.

tr(str, context, args){string}

D:/DEV_SRC/RxOT/DuPSF/tools/output/DuPSF.jsxinc, line 2403
Translate a given string based on the current language
see DuTranslator for more details about the translation framework.
Name Type Description
str string The text to be translated
context int | string Can be an integer or a string which is related to contextId or context in a translation file
args Array.<string> Args to format into the translated string, default is []
For example, when calling tr("Welcome {#}", -1, "Paul"), the output will be "Welcome Paul"
If too many args are given, they're ignored
If not enough args are given, "{#}" is replaced with "?"
Returns:
Type Description
string The translated text or the original string if nothing is set or available