0.3.0 • Published 2 years ago

@beetcb/sstore v0.3.0

Weekly downloads
373
License
ISC
Repository
github
Last release
2 years ago

npm

What the hack is sstore?

serverless-store is how you store tiny things at serverless function runtime temporarily,inspired by conf.

When to use it?

When you have a tiny piese of data(an expiring access-token, for example), sstore stores it for you to path /temp/conf/${md5('conf.json').

Better yet, sstore won't block any code execution during runtime.

How to use it?

const sstore = require('@beetcb/sstore')

exports.main = () => {
  // If `secret` is undefind, set it
  console.log(sstore.get('secret') || sstore.set('secret', 'xxx 🕊'))
  // Code logic is done, starts storing,
  sstore.close()
}

sstore.\<method>:

  • get(key): get key's value
  • set(key, value): set key using value
  • del(key): delete key's value
  • clear(): delete all the key value pairs
  • close(): This is where the sstore really starts to store
0.3.0

2 years ago

0.1.2

3 years ago

0.2.0

3 years ago

0.1.1

3 years ago

0.1.0

3 years ago

0.0.9

3 years ago

0.0.8

3 years ago

0.0.7

3 years ago

0.0.6

3 years ago

0.0.5

3 years ago

0.0.4

3 years ago

0.0.3

3 years ago

0.0.2

3 years ago

0.0.1

3 years ago

0.0.0

3 years ago