@graphty/cytoscape-extensions / io / importElements
Function: importElements()
importElements(
input,format?,options?):Promise<ImportedElements>
Defined in: cytoscape-extensions/src/io.ts:91
Reads a graph file into Cytoscape element definitions.
Parameters
input
ArrayBuffer | ImportInput
the file as text, bytes, a stream or chunks
format?
ImportFormat = "auto"
the format, or "auto" to sniff it
options?
ImportOptions = {}
graph-io's import options
Returns
Promise<ImportedElements>
the elements, the direction, the format and graph-io's report
Throws
ImportError (from graph-io) when the file cannot be read, or when it yields no node and reports an error