sidebuf
v1.0.0
Published
A JavaScript side buffer
Downloads
8
Maintainers
Readme
SideBuf
A JavaScript side buffer
How to use it?
First, install it:
- Browser:
<script src="https://unpkg.com/sidebuf"></script>
- node
npm i sidebuf
Then, use it like:
// getting the sidebuf object
const sidebuf = new SideBuf() // for node, use require('sidebuf')
sidebuf.push(name, value) // set a new value
sidebuf.pull(name) // get the value from name
sidebuf.tmp(name, value) // similar as sidebuf.push, but will destroy itself 10 seconds after
sidebuf.reset() // reset every values in the cache
sidebuf.clear(name) // deletes a value from its name
© Arthur Guiot 2017