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.2.0 to 5.2.1

10

build/models/balance.js

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

key: String,
rawKey: String,
book: String,

@@ -36,3 +37,3 @@ account: String,

// Example of a complex key: "My book;Liabilities:Client,Liabilities:Client Pending;clientId.$in.0:12345,clientId.$in.1:67890"
const key = [
return [
book,

@@ -47,9 +48,10 @@ account,

.join(";");
return hashKey(key);
}
exports.constructKey = constructKey;
async function snapshotBalance(balanceData, options = {}) {
const key = constructKey(balanceData.book, balanceData.account, balanceData.meta);
const rawKey = constructKey(balanceData.book, balanceData.account, balanceData.meta);
const key = hashKey(rawKey);
const balanceDoc = {
key,
rawKey,
book: balanceData.book,

@@ -74,5 +76,5 @@ account: balanceData.account,

const { book, account, meta, ...extras } = query;
const key = constructKey(book, account, { ...meta, ...extras });
const key = hashKey(constructKey(book, account, { ...meta, ...extras }));
return exports.balanceModel.collection.findOne({ key }, { sort: { _id: -1 }, session: options.session });
}
exports.getBestSnapshot = getBestSnapshot;

2

package.json
{
"name": "medici",
"version": "5.2.0",
"version": "5.2.1",
"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