Skip to content

NOT YET BENCHMARKED OR IN PRODUCTION! @grundstein/mem-store. minimal non-persistant in-process key -> value store for nodejs.

License

Notifications You must be signed in to change notification settings

grundstein/mem-store

Repository files navigation

@grundstein/mem-store

WIP. NOT IN PRODUCTION YET!

minimal, memory only, key -> value store for nodejs.

installation

npm i @grundstein/mem-store

usage

import memStore from '@grundstein/mem-store'

const data = {
  initial: 'data',
}

const store = memStore(data)

store.get('initial') // 'data'

store.set('key', 'value')

store.get('key') // 'value'

store.set('', '') // error, error.code === 'E_KEY_EMPTY'

store.set('key', '') // no error. value of store.key is ''.

store.set(undefined, [23]) // error. error.code === 'E_KEY_TYPE'

changelog

v0.0.2 - unreleased

...

v0.0.1

first release

About

NOT YET BENCHMARKED OR IN PRODUCTION! @grundstein/mem-store. minimal non-persistant in-process key -> value store for nodejs.

Resources

License

Stars

Watchers

Forks

Packages

No packages published