These are helper methods that get added to global window variable.
Methods
-
static createTable(data, config) → {Spyral.Table}
-
Create a new Table
Parameters:
Name Type Description dataObject | Array | String | Number configSpyral.Table~TableConfig Returns:
Spyral.Table -
static loadCorpus(config, api) → {Promise.<Corpus>}
-
Load a Corpus using the provided config and api
Parameters:
Name Type Description configSpyral.Corpus~CorpusConfig the Corpus config
apiObject any additional API values
Returns:
Promise.<Corpus> -
static show(contents, lenopt, modeopt)
-
Show contents in the results area. Will try to intelligently handle most types of content.
Parameters:
Name Type Attributes Default Description contents* The contents to show
lenNumber <optional>
A maximum length to trim the contents to
modeString <optional>
info A CSS class to apply to the shown contents
-
static showError(error, moreopt)
-
Show an error in the results area.
Parameters:
Name Type Attributes Description error* An Error to display
more* <optional>
Additional Error details