json-fs-query
    Preparing search index...

    Module storage

    The storage layer: every file json-fs-query reads, writes or deletes goes through these functions, and nothing else touches fs or fetch(). Paths given to them are inside the database (see storagePath).

    Today there is one backend, JSON files (on disk in Node, over fetch() in a browser). Keeping it behind these few functions is what lets a read cache, batched writes and other storage backends come later without touching queries.

    cachedRead
    cacheRemove
    cacheWrite
    databaseFolderExists
    databasesLocation
    fileExists
    jsonText
    listFiles
    makeDatabaseFolder
    makeDirectory
    nodeFiles
    pendingExists
    pendingFile
    pendingListing
    readDatabaseList
    readJson
    readText
    removeDatabaseFolder
    removeDirectory
    removeFile
    stageMakeDirectory
    stageRemove
    stageRemoveDirectory
    stageWrite
    storagePath
    withReadCache
    withWriteSet
    writeAtomically
    writeDatabaseList
    writeJson