
Security News
New CVE Forecasting Tool Predicts 47,000 Disclosures in 2025
CVEForecast.org uses machine learning to project a record-breaking surge in vulnerability disclosures in 2025.
in-memory-database
Advanced tools
A simple caching module that works a like memcached. All keys are stored in a single object.
Simple caching module that works a like memcached. All keys are stored in a single object.
npm install --save in-memory-database
const { InMemoryDatabase } = require('in-memory-database');
const client = new InMemoryDatabase();
client.set('key', 'value');
client.get('key');
class InMemoryDatabase()
Class Methods
These functions are specified in the in-memory-database.
get(key: string): any
Gets a key'svalue.
client.get('key');
set(key: string, value: any): void
Sets a key to value.
client.set('key', 'value');
delete(key: string): void
Deletes a key.
client.delete('key');
mget(keys: string[]): any
Lists all of the keys that defined in the array.
const values = client.mget(['key1', 'key2']);
mset(keyValueMap: Map<string, any>): void
Sets the multiple a keys/values.
const keyValueMap: Map<string, any> = new Map();
keyValueMap.set('key1', 'value1');
keyValueMap.set('key2', {'foo': 'bar', 'baz': 1});
client.mset(keyValueMap);
keys(): string[]
Get all database keys.
const keys = client.keys();
has(key: string): boolean
Defines if we have stored specific key in database.
const isAlreadyThere = client.has('key');
flush(): void
Flush database.
client.flush();
npm run test
š¤ Dimos Botsaris
Give a āļø if this project helped you!
FAQs
A simple caching module that works a like memcached. All keys are stored in a single object.
The npm package in-memory-database receives a total of 352 weekly downloads. As such, in-memory-database popularity was classified as not popular.
We found that in-memory-database demonstrated a not healthy version release cadence and project activity because the last version was released a year ago.Ā It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
CVEForecast.org uses machine learning to project a record-breaking surge in vulnerability disclosures in 2025.
Security News
Browserslist-rs now uses static data to reduce binary size by over 1MB, improving memory use and performance for Rust-based frontend tools.
Research
Security News
Eight new malicious Firefox extensions impersonate games, steal OAuth tokens, hijack sessions, and exploit browser permissions to spy on users.