
Security News
Deno 2.4 Brings Back deno bundle, Improves Dependency Management and Observability
Deno 2.4 brings back bundling, improves dependency updates and telemetry, and makes the runtime more practical for real-world JavaScript projects.
quick.db-map
Advanced tools
quick.db-map@1.0.10
quick.db Install this too in your dependencies
quick.db Website For vanilla documentation
quick.db Discord server Join it seriously
If you're having trouble installing, please follow this troubleshooting guide.
npm i quick.db quick.db-map
Note: Windows users may need to do additional steps listed here.
npm i -g node-gyp
in terminalnode-gyp --python /path/to/python2.7
(skip this step if you didn't install python 3.x)npm i quick.db quick.db-map
Cached database usage
const Database = require("quick.db-map");
//NOTE: table name is not a required parameter, if nothing is provided it does not create a table, and uses the default plain db
const db = new Database({ tableName: "abc", cache: true, clearCache: true }); //clearCache is a boolean and it will clear the cache every 5 minutes by default
//dbPath is a optional parameter, if nothing is provided it will use the default storage location
db.set("a", "b");
console.log(db.get("a")); //returns b
Clear cache at intervals (Other Options)
const Database = require("quick.db-map");
const db = new Database({
tableName: "abc",
cache: true,
clearCache: true,
maxCacheLimit: 250,
clearCacheInterval: "30s 10m 5h 2d 3w",
verbose: true,
}); //maxCacheLimit is the maximum amount of cache that can be stored, clearCacheInterval will override the default 5 minutes interval <30s 10m 5h 2d 3w> [30seconds, 10minutes, 5hours, 2days, 3weeks]
//setting verbose to true will log the events happening
db.set("a", "b");
console.log(db.get("a")); //returns b
All Functions
const Database = require("quick.db-map");
const db = new Database({
dbPath: "./Databases/mydatabasename.db",
tableName: "abc",
cache: true,
clearCache: true,
maxCacheLimit: 1,
clearCacheInterval: "4s",
expiryInterval: "20s",
verbose: true,
});
db.set("a", "b"); //sets b in value a
//Objects and Arrays also work!
db.get("a"); //returns b
db.has("a"); //returns true
db.delete("a"); //deletes a
db.has("a"); //returns false
db.set("a", { a: "b" }); //sets b in value a in the object
db.set("a.b", "abc"); //sets this as an object
db.deleteAll(); //WARNING! clears the entire database
db.ClearCache(); //Clears the database
db.cacheSize(); //returns the size of the cache
db.set("arandomnumber", 1);
db.add("arandomnumber", 20); //adds 1+20 to the value of arandomnumber and returns 21
db.subtract("arandomnumber", 10); //subtracts 10 from the value of arandomnumber and returns 11
db.set("an Array", [1, 2, 3, "b r u h meme", 6, 8, 2, 5, 7, 3, "meme bro?"]); //set a value as a array
db.push("an Array", 4); //adds 4 to the array and returns [1, 2, 3, 4]
db.reCache(); //re-caches the entire database into the cache
db.backup({ name: "MY DATABASE", path: "./" }); //backup the database
db.expiry("a", { m: 2 }); // expiry goes like this as Object only "{ y:2010, M:3, d:5, h:15, m:10, s:3, ms:12}" or "{ years:2010, months:3, days:5, hours:15, minutes:10, s:3, miliseconds:123}" and deletes "a" after 2 months
console.log(db.pull("an Array", "b r u h meme")); // removes "b r u h meme" from the array
console.log(db.sort("an Array")); // sorts the array and returns "Strings" in the first and then the "Numbers"
console.log(db.reverse("an Array")); // reverses the array
console.log(db.remove("an Array", (value) => value === "b r u h meme")); // removes "b r u h meme" from the array
db.setMany([
{ key: "KEY-1", value: "VALUE-1" },
{ key: "KEY-2", value: "VALUE-2" },
{ key: "KEY-3", value: "VALUE-3" },
]);
Added Pull, sort and reverse All Array related features
FAQs
quick.db-map is a quick.db extention which allows
The npm package quick.db-map receives a total of 0 weekly downloads. As such, quick.db-map popularity was classified as not popular.
We found that quick.db-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
Deno 2.4 brings back bundling, improves dependency updates and telemetry, and makes the runtime more practical for real-world JavaScript projects.
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.