an implementation of Map that stores all its data on the filesystem allowing the data to be shared among multiple running node processes or to persist for multiple runs of a script

Param

the filesystem name to store data within. this will be combined with the current working directory and a subdirectory of FileSystemMap and have the extension .json appended to it

Param

an optional array of arrays containing two elements used to seed the instantiated map object

Param

an optional AftConfig instance that allows you to override any FileSystemMapConfig loaded from appsettings.json

Type Parameters

Hierarchy

  • FileSystemMap

Implements

  • Map<Tkey, Tval>

Constructors

Properties

_aftCfg: AftConfig
_memoryMap: Map<Tkey, Tval>
filename: string

Accessors

Methods

  • Parameters

    • callbackfn: ((value, key, map) => void)
        • (value, key, map): void
        • Parameters

          • value: Tval
          • key: Tkey
          • map: Map<Tkey, Tval>

          Returns void

    • Optional thisArg: any

    Returns void

  • removes the file used to cache data on the filesystem

    Parameters

    • filename: string

      the name of the file minus any suffix to delete (i.e. MyCacheFile which equates to full/path/to/FileSystemMap/MyCacheFile.json)

    • Optional aftCfg: AftConfig

    Returns void

Generated using TypeDoc