json-fs-query
    Preparing search index...

    Function queryStatus

    • Whether some query text, typed so far, is ready to run, and if not what it is waiting for: for a prompt which reads a query over several lines (such as the CLI). Uses the same rules as the parser, so a ; inside a string, a comment or brackets doesn't count, and an open quote, comment or bracket keeps the query going.

      Parameters

      • text: string = ''

        everything typed so far; join the lines with '\n', since a -- comment ends at the end of a line

      Returns QueryStatus

      queryStatus("read notes where text = 'it") // { complete: false, waitingFor: "'" }
      queryStatus('read notes;') // { complete: true, waitingFor: '' }