
Security News
Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Key/value data/query API to use on the server or in the browser.
npm install keydb
Writes through KeyDB are done with the send
method, and reads are done with
the query
method.
var keydb = require('keydb');
// mysql driver assumes localhost/3306/root
var db = keydb('mysql', 'test');
// upsert
db.send({op: 'set', key: 'foo', value: 'bar'})
.then(function () {
// foo is now "bar"
})
.then(function () {
// use funql syntax to query
return db.query("eq(key,'foo')");
})
.then(function (items) {
// items[0].key === "foo"
// items[0].value === "bar"
})
.finally(function () {
// disconnect
return db.end();
});
You can use set
sugar instead of the send
method for a set operation, and
you can use get
sugar to retrieve a single key:
var keydb = require('keydb');
// mysql driver assumes localhost/3306/root
var db = keydb('mysql', 'test');
// upsert
db.set('foo', 'bar')
.then(function () {
// foo is now "bar"
})
.then(function () {
return db.get('foo')
})
.then(function (item) {
// items.key === "foo"
// items.value === "bar"
})
.finally(function () {
// disconnect
return db.end();
});
FAQs
Key/value data/query API to use on the server and in the browser.
The npm package keydb receives a total of 44 weekly downloads. As such, keydb popularity was classified as not popular.
We found that keydb demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 3 open source maintainers 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.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Security News
React's CRA deprecation announcement sparked community criticism over framework recommendations, leading to quick updates acknowledging build tools like Vite as valid alternatives.
Security News
Ransomware payment rates hit an all-time low in 2024 as law enforcement crackdowns, stronger defenses, and shifting policies make attacks riskier and less profitable.