Preserve the class name across minification.
Return the data in an ArrayBuffer
backed with a byte array.
Options. The valid option is utf8
, which defaults to true
A Promise
which resolves to an array buffer with the data
Return the data in the form of a Blob
Options. The valid option is utf8
, which defaults to true
A Promise
that resolves to a Blob
Interpret the data as CSV text. Uses D3's CSV/TSV parser.
Options. The valid option is utf8
, which defaults to true
A Promise
which returns the data parsed as CSV
Internal method.
Method that is requesting the data, to handle any prepatory conversions needed
Any options passed to the original method
A Promise
resolving to the data in the requested form.
Return the data as JSON (as a Promise)
Options. The valid option is utf8
, which defaults to true
A Promise
that resolves to a JSON value.
Return the data as a string.
Options. The valid option is utf8
, which defaults to true
A Promise
that resolves to a text string.
Interpret the data as TSV text. Uses D3's CSV/TSV parser.
Options. The valid option is utf8
, which defaults to true
A Promise
which returns the data parsed as TSV
Obtain Promise
to a data URL with the data.
Options. The valid option is utf8
, which defaults to true
A Promise
that resolves to a data URL with the data.
Generated using TypeDoc
new AFile(
name, data, metadata)
This implements the same interface as FileAttachment, but works with supplied data in a variety of forms:
{utf8:
false}
to use UTF16 rather than UTF8 encoding.ReadableStream
, the result is cached. The function is called with the following arguments:json
,text
.arrayBuffer
,stream
,url
,csv
,tsv
. These indicate how the data will be used, allowing the function to choose how to represent it. the usual conversions will be applied as needed, however, so it may be safely ignored..json()
methodPromise
that resolves to any of the above.metadata is either an object with metadata to be combined, or a string, which is interpreted as the
contentType
, as a shorthand when that is the only metadata being supplied.All operations are asynchronous.