script.library
Imports a JavaScript file from the MODLR filesystem, making its functions and variables available to the process.
Call it at the top of the script, outside pre(), begin(), data() and end(), so every function can use what it imports.
js
script.library(path)Parameters
| Parameter | Type | Description |
|---|---|---|
path | string | The file's path, from the root of the MODLR filesystem. |
Examples
js
script.library('dimension-functions.js');This imports dimension-functions.js from the root of the MODLR filesystem.