Docs > API > kit
The kit global variable contains some miscellaneous methods.
If you create a variable named "kit", it will over-write the existing global variable and you will be unable to access its methods (unless you copy it first), e.g.
backupKit = kit;
kit = "string";
// this still works
backupKit.sleep(1000);
| Methods | |
|---|---|
| kit.getLabel(label, language) | Retrieve a string of translated text (in a particular language) from a label. |
| kit.getStackTrace() | Fetch the full stacktrace of a JavaScript error. It must be used on the special __exception__ variable, as in the example below:try { |
| kit.quote(string) | Wrap a string in quotation marks (') and escape as appropriate, e.g.string = "I'm writing code"; |
| kit.sleep(millis) | Pause the script for this many milliseconds. Returns the number of milliseconds that the script actually did sleep. |
| kit.xmlEscape(string) | Convert special XML characters into their corresponding entities, e.g. < becomes < |
| kit.xmlUnescape(string) | Convert XML entities into their corresponding characters, e.g. < becomes < |



