Global

Members

# i18n

The translation engine

View Source DuAEF_DuGR_api.jsxinc, line 3534

# 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

View Source DuAEF_DuGR_api.jsxinc, line 4378

Methods

# def(val, defaultVal) → {object}

Assigns a default value to a var if it's undefined.
Parameters:
Name Type Description
val object The variable to set
defaultVal object The default value

View Source DuAEF_DuGR_api.jsxinc, line 396

The var
object
Example
foo = def( foo, 12 ); // if foo was undefined, it is now 12, else it's unchanged.

# isdef(val) → {boolean}

Checks if a value is defined. Convenience replacement for `typeof val !== 'undefined`
Parameters:
Name Type Description
val any The value

View Source DuAEF_DuGR_api.jsxinc, line 407

boolean

# jstype(exp) → {string}

Improved typeof which returns the type of object instead of 'object'
Parameters:
Name Type Description
exp any The expression to check.

View Source DuAEF_DuGR_api.jsxinc, line 418

The type always in lower case.
string