nupp.io.storage

Persistent key/value storage owned by the current host.

Module contents

Functions

FunctionKindDescription
clearfunctionRemoves every key in the selected store.
getfunctionReads one UTF-8 value, or nil if the key is absent.
removefunctionRemoves one key.
setfunctionWrites one UTF-8 value.

Functions#

clearfunction#

const clear: function(): nil

Removes every key in the selected store.

Returns

TypeDescription
nil

getfunction#

const get: function(name: string): string?

Reads one UTF-8 value, or nil if the key is absent.

Arguments

NameTypeDescription
namestring

Returns

TypeDescription
string?

removefunction#

const remove: function(name: string): nil

Removes one key.

Arguments

NameTypeDescription
namestring

Returns

TypeDescription
nil

setfunction#

const set: function(name: string, value: string): nil

Writes one UTF-8 value.

Arguments

NameTypeDescription
namestring
valuestring

Returns

TypeDescription
nil