Throw a clear error when action is attempted outside Node. In a browser json-fs-query reads the database over
fetch(), and nothing can be written: without this check a write reached the missing fs functions and failed with
an unhelpful "... is not a function".
Parameters
action: string
What was attempted, for the message (for example "insert" or "create()").
Throw a clear error when
actionis attempted outside Node. In a browser json-fs-query reads the database over fetch(), and nothing can be written: without this check a write reached the missingfsfunctions and failed with an unhelpful "... is not a function".