json-fs-query
    Preparing search index...

    Function requireNode

    • 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()").

      Returns void

      Outside Node.