dirz

a super simple key/value store

Usage no npm install needed!

<script type="module">
  import dirz from 'https://cdn.skypack.dev/dirz';
</script>

README

Classes

Dirz : Dirz

Members

id : string

Dirz : Dirz

Kind: global class

dirz.get(key, [defaultValue]) ⇒ *

gets value for the key.

Kind: instance method of Dirz

Param Type Default Description
key string
[defaultValue] number | string | boolean optional. returns this value if the key has not been set.

dirz.set(key, value, [type])

sets the value with the desired type, if specified. bool type is converted to bool so that passing "false" will equal false

Kind: instance method of Dirz

Param Type Description
key string
value number | string | boolean
[type] string allowed types are string int/integer float bool/boolean

dirz.remove(key)

removes the key from the store

Kind: instance method of Dirz

Param Type
key string

id : string

Kind: global variable