
Security News
PyPI Expands Trusted Publishing to GitLab Self-Managed as Adoption Passes 25 Percent
PyPI adds Trusted Publishing support for GitLab Self-Managed as adoption reaches 25% of uploads
@joaootavios/redis-map
Advanced tools
A simple way to use something similar to the Map in javascript, but synchronized with the power of Redis.
A simple way to use something similar to the Map in javascript, but synchronized with the power of Redis.
npm install @joaootavios/redis-map
const RedisMap = require("@joaootavios/redis-map");
const mapInstance = new RedisMap({ name: "my_map", url: REDIS_URL, monitor: (type, message) => {
console.log(`Monitor: ${type} - ${message}`);
}
});
// connect to redis to start using the map
await mapInstance.connect();
await mapInstance.set("joaootavios", { plan: "rich", age: 999, power: "god" });
await mapInstance.set("batman", { plan: "?", age: "?" }, 10); // expire in 10 seconds;
console.log(mapInstance.get("joaootavios"));
const RedisMap = require("@joaootavios/redis-map");
const mapInstance = new RedisMap({ name: "my_map", url: REDIS_URL });
// connect to redis to start using the map
await mapInstance.connect();
console.log(mapInstance.get("joaootavios"));
To initialize the RedisMap class, you can use the following options:
const RedisMap = require("@joaootavios/redis-map");
const options = {
name: "my_map",
url: "redis://localhost:6379",
autoConnect: true, // default: false
syncOnConnect: false, // default: true
redisOptions: {},
monitor: (type, message) => {
console.log(`Monitor: ${type} - ${message}`);
},
};
const myMap = new RedisMap(options);
This project is licensed under the Apache License 2.0
FAQs
A simple way to use something similar to the Map in javascript, but synchronized with the power of Redis.
The npm package @joaootavios/redis-map receives a total of 0 weekly downloads. As such, @joaootavios/redis-map popularity was classified as not popular.
We found that @joaootavios/redis-map 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
PyPI adds Trusted Publishing support for GitLab Self-Managed as adoption reaches 25% of uploads

Research
/Security News
A malicious Chrome extension posing as an Ethereum wallet steals seed phrases by encoding them into Sui transactions, enabling full wallet takeover.

Security News
Socket is heading to London! Stop by our booth or schedule a meeting to see what we've been working on.