Newer
Older
# Standalone JS Functions
Collection of custom functions without dependencies on FC specific variables/data structures.
## utilJS.js
Capitalizes the first character of `string`.
* `addA(word)`:
Adds an `an ` if the first character is a vocal, otherwise `a `.
Takes a number and appends the appropriate suffix.
Example: `ordinalSuffix(1)` gives `1st`.
Example: `ordinalSuffix(1)` gives `first`.
For number greater than 19 identical to `ordinalSuffix(i)`
* `removeDuplicates(array)`:
Takes an array and returns a new array without duplicate entries.
Returns whether x is undefined. A JS port of SugarCube's def.
Returns `true` if `a` is between `low` and `high`, otherwise `false`.