
Research
/Security News
9 Malicious NuGet Packages Deliver Time-Delayed Destructive Payloads
Socket researchers discovered nine malicious NuGet packages that use time-delayed payloads to crash applications and corrupt industrial control systems.
gcloud-kvstore
Advanced tools
Use Datastore as a Key/Value store.
$ npm install --save gcloud-kvstore
var kvstore = require('gcloud-kvstore');
var datastore = require('@google-cloud/datastore')(/*...*/);
var store = kvstore(datastore);
// Set an item.
store.set('todos', ['eat', 'sleep', 'repeat'], function(err, key) {});
// Get an item.
store.get('todos', function(err, todos) {
// todos:
// ['eat', 'sleep', 'repeat']
});
// Delete an item.
store.delete('todos', function(err) {});
Google Cloud Datastore is a managed, NoSQL, schemaless database for storing non-relational data. Datastore entities are complex objects. However, we can wrap this complexity to mimic a simple key/value store by storing a numeric or string "key" as the id of an entity.
The example below shows the complexity that is hidden with gcloud-kvstore.
@google-cloud/datastore:var key = datastore.key(['KeyValue', 'key']);
datastore.save({
key: key,
value: 'value'
}, function() {});
datastore.get(key, function() {});
datastore.delete(key, function() {});
@google-cloud/datastore + gcloud-kvstore:var store = require('gcloud-kvstore')(datastore);
store.set('key', 'value', function() {});
store.get('key', function() {});
store.delete('key', function() {});
A @google-cloud/datastore instance.
Type: String|Number
Type: Function
Executed with the same signature as Datastore#delete.
Type: String|Number
Type: Function
Executed with (err, value)
Type: String|Number
Type: *
Type: Function
Executed with the same signature as Datastore#save.
Concept originally created by Patrick Costello: https://github.com/GoogleCloudPlatform/gcloud-node/issues/256#issuecomment-58962323.
MIT © Stephen Sawchuk
FAQs
Use gcloud's Datastore as a key-value store.
We found that gcloud-kvstore 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.

Research
/Security News
Socket researchers discovered nine malicious NuGet packages that use time-delayed payloads to crash applications and corrupt industrial control systems.

Security News
Socket CTO Ahmad Nassri discusses why supply chain attacks now target developer machines and what AI means for the future of enterprise security.

Security News
Learn the essential steps every developer should take to stay secure on npm and reduce exposure to supply chain attacks.