kartei-sdk
v0.1.0
Published
Kartei.io is a registration-free key-value-store used for rapid development and prototyping
Downloads
4
Readme
kartei.io-sdk
Kartei.io is the registration-free key-value-store for fast developing and rapid prototyping.
All stored apps:
- will be deleted after 5 days
- can have up to 1000 keys
- hold 20MB data at all
Example
try {
const token = 'my-selfchoosen-appid---maybe-uuid4---but-minlength-30'
const kartei = createKarteiApp(token)
await kartei.set('onekey', 'onevalue')
const value = await kartei.get('onekey')
console.log("onekey", value)
} catch (error: unknown) {
if (TokenError.is(error)) {
// TODO Handle TokenError thrown by createKarteiApp
}
if (NotFoundError.is(error)) {
// TODO Handle NotFoundError thrown by get
}
if (KarteiError.is(error)) {
// TODO Handle KarteiError thrown by set/get
}
// TODO Handle other Errors
}