3.1.4
Type: string
Type: string
Type: string
Type: string
Type: string
Type: string
(any)
boolean
(any)
boolean
(any)
any
(any)
any
(any)
any
(any)
any
((Value | undefined | null))
any
(any)
(string)
Error
(any)
StringDictionary
Converts entire DataView to a string as utf-8.
(DataView)
bytes to convert
string
:
the string
Log a message to the console. Put here to limit lint console errors for the times we really do want to use console.log. Will also append a p tag to a div#debug if it exists.
(string)
the message to log
void
typescript-y check if Error.
(any)
object that might be an Error
any
:
true if Error object
typescript-y convert errors.
(any)
obejct that might be an Error object
Error
:
an Error object
Log a warning message to the console. Put here to limit lint console errors for the times we really do want to use console.log. Will also append a p tag to a div#debug if it exists.
(string)
the message to log
void
String representation of input. This is kind of dumb but makes flow happier.
(any)
any kind of thing that can be turned into a string
string
:
a string
(string)
DateTime
Create a luxon Interval from a start and end.
((string | DateTime))
start of the interval as iso string or DateTime
((string | DateTime))
end of the interval as string or DateTime
Interval
:
the interval
Create a luxon Interval from a start and a duration. If the duration is negative, the start time will become the end time. This differs from luxon Interval.after which will return an invalid Interval instead.
((string | DateTime))
start of the interval as iso string or DateTime
Interval
:
the interval
Create a luxon Interval from a duration and a end. If the duration is negative, the end time will become the start time. This differs from luxon Interval.before which will return an invalid Interval instead.
((string | DateTime))
end of the interval as string or DateTime
Interval
:
the interval
Calculates offset of remote server versus local time. It is assumed that the argument was acquired as close in time to calling this as possible.
(DateTime)
now as reported by remote server
number
:
offset in seconds to now on local machine
Type: DateTime
converts the input value is a DateTime, throws Error if not a string, Date or DateTime. Zero length string or "now" return current time.
DateTime
:
DateTime created from argument
Converts name and value into a html query parameter, with appending ampersand.
(string)
parameter name
(any)
parameter value
string
:
formated query parameter
Converts name and value into a parameter line, with appending newline, for including in POST body.
(string)
parameter name
(any)
parameter value
string
:
formated query parameter
converts to ISO8601 but removes the trailing Z as FDSN web services do not allow that.
(DateTime)
DateTime to convert to string
string
:
ISO8601 without timezone Z
Extracts a valid starting DateTime from interval. Throws Error if interval is not valid.
(Interval)
luxon Interval
DateTime
:
start DateTime
Extracts a valid ending DateTime from interval. Throws Error if interval is not valid.
(Interval)
luxon Interval
DateTime
:
end DateTime
Converts a luxon DateTime to a Javascript Date, checking for null, undefined and isValid first. Throws Error in that case.
((DateTime | null | undefined))
luxon DateTime
any
:
Javascript Date
Check a Luxon DateTime, Interval or Duration for valid. Throws Error if not. THis is to avoid globally setting luxon's Settings.throwOnInvalid = true; but still throw/catch on invalid dates.
((null | DateTime | Interval | Duration))
luxon object
(string?)
optional message to add to error
any
:
passed in object if valid
string
:
the protocol, http: or https: for the document if possible.
Note this includes the colon.
Create default fetch init object with the given mimeType. Sets no-cache, follow redirects, cors mode, referrer as seisplotjs and mimetype as a header. Note that redirect with POST may fail due to POST being changed to GET on a 301. Fetching with POST may wish to use redirect: "manual" to handle the 301 correctly by POSTing to the new URL.
(string?)
requested mime type
RequestInit
:
object with fetch configuration parameters
(RequestInit)
RequestInit
Promise<Response>
Type: (null | function (url: (URL | RequestInfo), init: (RequestInit | undefined)): Promise<Response>)
function (url: (URL | RequestInfo), init: (RequestInit | undefined)): Promise<Response>
Does a fetch, but times out if it takes too long.
(RequestInit?)
fetch configuration, initialization
(number?)
maximum time to wait in seconds
Promise<Response>
:
promise to the result
Allows downloading of in memory data, as ArrayBuffer, to file as if the user clicked a download link.
(ArrayBuffer)
ArrayBuffer to download
(string)
default filename
(any
= "application/octet-stream"
)
mimeType, default application/octet-stream
Recursively calculates the mean of a slice of an array. This helps with very long seismograms to equally weight each sample point without overflowing.
((Int32Array | Float32Array | Float64Array))
slice of a seismogram
(number)
number of points in the original seismogram
number
:
sum of slice data points divided by totalPts
Type: string
Type: string
(string)
SVGElement
(any
= "#sp-version"
)