Methods
(static) urlFileRelative(file, url) → {string}
A URL modifier function implementation that fixes up file-relative paths
Parameters:
Name | Type | Description |
---|---|---|
file |
string | The URL or path to which relative URLs are relative |
url |
string | The URL or POSIX path to resolve |
- Source:
Returns:
The resolved URL
- Type
- string
Type Definitions
ExecuteScriptOptions
The BareScript runtime options
Type:
- Object
Properties:
Name | Type | Attributes | Description |
---|---|---|---|
debug |
boolean |
<optional> |
If true, execute in debug mode |
fetchFn |
function |
<optional> |
The fetch function |
globals |
Object |
<optional> |
The global variables |
logFn |
function |
<optional> |
The log function |
maxStatements |
number |
<optional> |
The maximum number of statements; default is 1e9; 0 for no maximum |
statementCount |
number |
<optional> |
The current statement count |
urlFn |
function |
<optional> |
|
systemPrefix |
string |
<optional> |
The system include prefix |
- Source:
FetchFn(url, optionsopt, nullable) → {Promise}
The fetch function
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
url |
string | The URL to fetch |
|
options |
Object |
<optional> <nullable> |
The fetch options |
- Source:
Returns:
The fetch response promise
- Type
- Promise
LogFn(text)
The log function
Parameters:
Name | Type | Description |
---|---|---|
text |
string | The log text |
- Source:
URLFn(url) → {string}
The URL modifier function
Parameters:
Name | Type | Description |
---|---|---|
url |
string | The URL |
- Source:
Returns:
The modified URL
- Type
- string