Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

medici

Package Overview
Dependencies
Maintainers
2
Versions
57
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

medici - npm Package Compare versions

Comparing version 5.0.0-next.3 to 5.0.0-next.4

6

build/Book.js

@@ -64,3 +64,3 @@ "use strict";

balance: { $sum: { $subtract: ["$credit", "$debit"] } },
count: { $sum: 1 },
notes: { $sum: 1 },
lastTransactionId: { $last: "$_id" },

@@ -75,6 +75,7 @@ lastTimestamp: { $last: "$timestamp" },

balance += balanceSnapshot.balance;
notes += balanceSnapshot.notes;
}
if (result) {
balance += parseFloat(result.balance.toFixed(this.precision));
notes = result.count;
notes += result.notes;
if (needToDoBalanceSnapshot && result.lastTransactionId) {

@@ -88,2 +89,3 @@ await (0, balance_1.snapshotBalance)({

balance,
notes,
expireInSec: this.balanceSnapshotSec * 2, // Keep the document twice longer than needed in case this particular balance() query is not executed very often.

@@ -90,0 +92,0 @@ }, options);

@@ -14,2 +14,3 @@ "use strict";

balance: Number,
notes: Number,
createdAt: Date,

@@ -50,2 +51,3 @@ expireAt: Date,

balance: balanceData.balance,
notes: balanceData.notes,
createdAt: new Date(),

@@ -52,0 +54,0 @@ expireAt: new Date(Date.now() + balanceData.expireInSec * 1000),

{
"name": "medici",
"version": "5.0.0-next.3",
"version": "5.0.0-next.4",
"description": "Simple double-entry accounting for Node + Mongoose",

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

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