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 3.0.1 to 3.0.2

4

package.json
{
"name": "medici",
"version": "3.0.1",
"version": "3.0.2",
"description": "Simple double-entry accounting for Node + Mongoose",

@@ -32,3 +32,3 @@ "main": "src/index.js",

"dependencies": {
"mongoose": "^5.6.2"
"mongoose": "^5.8.3"
},

@@ -35,0 +35,0 @@ "homepage": "https://github.com/koresar/medici",

@@ -7,2 +7,6 @@ [![Build Status](https://travis-ci.org/koresar/medici.png?branch=master)](https://travis-ci.org/koresar/medici)

```bash
npm i medici
```
## Basics

@@ -280,3 +284,4 @@

* the mandatory `_id` index takes about 600 KB,
* each of the above mentioned indexes take from 300 to 600 KB.
* each of the medici default indexes take from 300 to 600 KB.
* your custom indexes containing `meta.*` properties would take 600 to 1200 KB.

@@ -283,0 +288,0 @@ ## Changelog

@@ -136,7 +136,13 @@ module.exports = class Entry {

// Hello JavaScript. Your math rounding skill is mesmerising.
if (total > -1e-10 && total < 1e-10) total = 0;
if (total > -1e-7 && total < 1e-7) total = 0;
// Medici is about money counting. It should probably use more precise floating point number structure.
// However, for now we use JS built-in Number. Hence Medici limitations are coming from Number.MAX_SAFE_INTEGER === 9007199254740991
// Here are the limitations:
// * You can safely add values up to 1 billion and down to 0.000001.
// * Anything more than 1 billion or less than 0.000001 is not guaranteed and will throw the below error.
if (total > 0 || total < 0) {
const err = new Error("INVALID_JOURNAL");
if (total !== 0) {
const err = new Error("INVALID_JOURNAL: can't commit non zero total");
err.code = 400;
err.total = total;
console.error("Journal is invalid. Total is:", total);

@@ -143,0 +149,0 @@ return Promise.reject(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