Socket
Socket
Sign inDemoInstall

@keymetrics/interdb

Package Overview
Dependencies
Maintainers
4
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@keymetrics/interdb - npm Package Compare versions

Comparing version 0.0.2 to 0.0.3

4

lib/db.js

@@ -53,7 +53,7 @@ 'use strict'

updateAll (db) {
updateAll (db, cb) {
if (this.getLastUpdate() < db.lastUpdate) {
this.db = db
fs.writeFile(this.path, JSON.stringify(this.db), err => {
console.log(err)
if (typeof cb === 'function') return cb(err)
})

@@ -60,0 +60,0 @@ }

{
"name": "@keymetrics/interdb",
"version": "0.0.2",
"version": "0.0.3",
"description": "Shared and discoverable database services",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -22,6 +22,7 @@ # InterDB

// DB
con.db.put('key', {}) // put new data in existing key or create it
con.db.del('key') // delete key
con.db.find(/all/g) // find value
con.db.merge('key', {}) // merge values
con.db.put('key', {}, cb) // put new data in existing key or create it
con.db.del('key', cb) // delete key
con.db.get('key') // get value from key
con.db.updateAll({ data: {} }, cb) // Overwrite database
con.db.getLastUpdate() // Get timestamp of latest action

@@ -28,0 +29,0 @@ // Bus

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc