Gathering detailed insights and metrics for deepbase-redis
Gathering detailed insights and metrics for deepbase-redis
⚡ Fastest and simplest way to add Redis Stack persistence to your projects.
npm install deepbase-redis
Typescript
Module System
Node Version
NPM Version
71
Supply Chain
99.3
Quality
76.8
Maintenance
100
Vulnerability
100
License
JavaScript (100%)
Love this project? Help keep it running — sponsor us today! 🚀
Total Downloads
1,068
Last Day
1
Last Week
9
Last Month
43
Last Year
438
MIT License
18 Commits
1 Watchers
1 Branches
1 Contributors
Updated on Jan 10, 2024
Minified
Minified + Gzipped
Latest Version
1.1.1
Package Id
deepbase-redis@1.1.1
Unpacked Size
16.29 kB
Size
4.70 kB
File Count
6
NPM Version
10.2.3
Node Version
20.10.0
Published on
Feb 26, 2024
Cumulative downloads
Total Downloads
Last Day
0%
1
Compared to previous day
Last Week
-10%
9
Compared to previous week
Last Month
115%
43
Compared to previous month
Last Year
-30.5%
438
Compared to previous year
DeepBaseRedis is an innovative and efficient module designed to seamlessly integrate with Redis Stack, providing a robust solution for managing and interacting with databases. With DeepBaseRedis, you can effortlessly perform CRUD operations and manipulate data stored in Redis Stack (RedisJSON Module) keys.
For simplicity you may be interested in the version of DeepBase that persists in JSON files. https://www.npmjs.com/package/deepbase
1# DeepBaseRedis requires Redis Stack, which includes the necessary RedisJSON module. 2docker run -d --name redis-stack-server -p 6379:6379 redis/redis-stack-server:latest 3 4npm install deepbase-redis
1import DeepBase from "deepbase-redis" 2const mem = new DeepBase({ name: "db" }); // "db" redis prefix 3await mem.connect();
1await mem.set("config", "lang", "en"); 2 3const configLang = await mem.get("config", "lang"); 4console.log(configLang); // "en"
1const path = await mem.add("user", { name: "martin" }); 2 3// add() will create a secure key (ie. "CqtOILTDUg") 4console.log(path) // [ 'user', 'CqtOILTDUg' ] 5 6const userName = await mem.get(...path, "name"); 7console.log(userName); // "martin"
1await mem.inc(...path, "balance", 160); 2await mem.inc(...path, "balance", 420); 3 4const userBalance = await mem.get(...path, "balance"); 5console.log(userBalance); // 580
1await mem.upd("config", "lang", v => v.toUpperCase()); 2const lang = await mem.get("config", "lang"); // EN
1await mem.add("user", { name: "anya" }); 2 3const userIds = await mem.keys("user") 4console.log(userIds) // [ 'CqtOILTDUg', 'MXOlTBSmEf' ] 5 6console.log(await mem.get()) 7// { 8// config: { lang: 'EN' }, 9// user: { 10// CqtOILTDUg: { name: 'martin', balance: 580 }, 11// MXOlTBSmEf: { name: 'anya' } 12// } 13// }
Contributions to DeepBase are welcome! If you have an idea or a bug to report, please open an issue. If you would like to contribute to the code, please open a pull request.
DeepBaseRedis is built with efficiency and performance in mind, leveraging the power of the Redis Stack driver and optimizing data access operations. Whether you're building a small-scale application or a complex system, DeepBaseRedis empowers you to interact with Redis Stack effortlessly, making your development process smoother and more efficient.
🚀 Try DeepBaseRedis today and experience the convenience and power it brings to your Redis Stack data management workflow!
The MIT License (MIT)
Copyright (c) Martin Clasen
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
No vulnerabilities found.
No security vulnerabilities found.