Namespace: Storage-Memory

Storage.Storage-Memory

MemoryStorage stores data in memory.

Source:

Methods

(async) clear()

Clears the contents of memory.

Source:

(async) del(hash)

Deletes data from memory.

Parameters:
Name Type Description
hash string

The hash of the data to delete.

Source:

(async) get(hash)

Gets data from memory.

Parameters:
Name Type Description
hash string

The hash of the data to get.

Source:

(async, generator) iterator()

Iterates over records stored in memory.

Source:
Yields:
[string, string] The next key/value pair from memory.

(async) merge(other)

Merges data from another source into memory.

Parameters:
Name Type Description
other module:Storage

Another storage instance.

Source:

(async) put(hash, data)

Puts data to memory.

Parameters:
Name Type Description
hash string

The hash of the data to put.

data *

The data to store.

Source: