Create a new Value Collection
import { ValueCollection } from "rjweb-server"
const collection = new ValueCollection()
collection
.set('name', 'beta')
.set('key', 'value')
collection.has('key') // true
collection.has('ms') // false
collection.json() // { name: 'beta', key: 'value' }
for (const [ key, value ] of collection) {
console.log(key, value)
}
collection.clear(['key'])
collection.json() // { key: 'value' }
2.5.0
Protected allowProtected dataProtected maxProtected modifyThe Amount of Stored Objects
2.7.2
use .size() instead
Clear the Stored Objects
3.0.0
Delete a Key
8.0.0
Loop over all Keys
2.5.0
Check if a Key exists
2.5.0
A Key - Value Store with easy access functions
Example
Since
2.5.0