New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

blue-button-record

Package Overview
Dependencies
Maintainers
3
Versions
56
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

blue-button-record - npm Package Compare versions

Comparing version 1.3.0-beta.4 to 1.3.0-beta.5

4

index.js

@@ -178,4 +178,8 @@ "use strict";

exports.starNote = function (ptKey, id, star, callback) {
notes.starNote(dbinfo, ptKey, id, star, callback);
};
exports.getAllNotes = function (ptKey, callback) {
notes.allNotesInOrder(dbinfo, ptKey, callback);
};

@@ -50,2 +50,6 @@ "use strict";

entry: String,
star: {
type: Boolean,
default: false
}

@@ -52,0 +56,0 @@ });

@@ -22,2 +22,22 @@ "use strict";

//Stars note
exports.starNote = function (dbinfo, ptKey, id, star, callback) {
var model = dbinfo.notesModel;
model.findOne({
"username": ptKey,
"_id": id
}).exec(function (err, note) {
note.star = star;
note.save(function (err, result) {
if (err) {
console.log("error", err);
callback(err);
} else {
callback(null, result);
}
});
});
};
exports.allNotesInOrder = function (dbinfo, ptKey, callback) {

@@ -24,0 +44,0 @@ var model = dbinfo.notesModel;

2

package.json

@@ -5,3 +5,3 @@ {

"description": "Master Health Record and Data Reconciliation Engine Persistance Layer",
"version": "1.3.0-beta.4",
"version": "1.3.0-beta.5",
"repository": {

@@ -8,0 +8,0 @@ "type": "git",

@@ -62,2 +62,42 @@ "use strict";

it('star notes ', function (done) {
//record.
record.getAllNotes("username", function (err, data) {
expect(data).to.exist;
expect(data).to.have.length(1);
expect(data[0].star).to.be.false;
record.starNote("username", data[0]._id, true, function (err, data) {
expect(data).to.exist;
expect(data.star).to.be.true;
done();
});
});
});
it('unstar notes ', function (done) {
//record.
record.getAllNotes("username", function (err, data) {
expect(data).to.exist;
expect(data).to.have.length(1);
expect(data[0].star).to.be.true;
record.starNote("username", data[0]._id, false, function (err, data) {
expect(data).to.exist;
expect(data.star).to.be.false;
done();
});
});
});
it('clearDatabase', function (done) {

@@ -64,0 +104,0 @@ record.clearDatabase(function (err) {

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