Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

trying to bring nstore up to date with what tyrant has

  • Loading branch information...
commit f1024c82fe550c65bab175dcebcb5ecd3325f43c 1 parent fd5080c
Matthew Francis-Landau matthewfl authored
Showing with 13 additions and 0 deletions.
  1. +13 −0 db.nstore.js
13 db.nstore.js
View
@@ -39,6 +39,19 @@ exports.remove = function (key, callback) {
queue.add("d"+key, callback);
};
+exports.setCat = function (key, value, callback) {
+ exports.get(key, function (d) {
+ exports.set(key, d?d:""+value, callback);
+ });
+};
+
+exports.addInt = function (key, value, callback) {
+ exports.get(key, function (d) {
+ exports.set(key, d*1+value);
+ callback(d*1+value);
+ });
+};
+
exports._isMaster = function () {
master=true;
store = require('./lib/nstore')('./database.db');
Please sign in to comment.
Something went wrong with that request. Please try again.