Options
All .read(), .write(), and post() methods take an optional options parameter.
It is an object containing a set of values, overrides that can be utilized to change how prefs.us works.
timeout
Request / query timeout. Default: 20000 (20 seconds).
This will make a request to read data give up after 10 seconds.
prefs_us.read( (response)=>{ ... }, { timeout: 10000 })
This is a sample response should a timeout be reached.
{
success: false,
ts: 1772942419732,
error: "timeout",
message: "The operation timed out."
}