Comparing version 0.5.9 to 0.5.10
{ | ||
"name": "mf-finder", | ||
"version": "0.5.9", | ||
"version": "0.5.10", | ||
"description": "Find a molecular formula from a monoisotopic mass", | ||
@@ -21,8 +21,8 @@ "main": "src/index.js", | ||
"dependencies": { | ||
"atom-sorter": "^0.5.9", | ||
"chemical-elements": "^0.5.9", | ||
"mf-parser": "^0.5.9", | ||
"mf-utilities": "^0.5.9", | ||
"atom-sorter": "^0.5.10", | ||
"chemical-elements": "^0.5.10", | ||
"mf-parser": "^0.5.10", | ||
"mf-utilities": "^0.5.10", | ||
"molecular-formula": "^1.1.0" | ||
} | ||
} |
@@ -31,5 +31,5 @@ 'use strict'; | ||
let range = targetMass * precision / 1e6; | ||
for (var i = 0; i < size; i++) { | ||
let charge = i + this.minCharge; | ||
if (charge === 0) { | ||
for (let i = 0; i < size; i++) { | ||
let currentCharge = i + this.minCharge; | ||
if (currentCharge === 0) { | ||
if (allowNeutral) { | ||
@@ -43,4 +43,4 @@ minMass = targetMass - range; | ||
} else { | ||
minMass = (targetMass - range) * Math.abs(charge) + ELECTRON_MASS * charge; | ||
maxMass = (targetMass + range) * Math.abs(charge) + ELECTRON_MASS * charge; | ||
minMass = (targetMass - range) * Math.abs(currentCharge) + ELECTRON_MASS * currentCharge; | ||
maxMass = (targetMass + range) * Math.abs(currentCharge) + ELECTRON_MASS * currentCharge; | ||
} | ||
@@ -50,3 +50,3 @@ | ||
this.data.push({ | ||
charge, | ||
charge: currentCharge, | ||
minMass, | ||
@@ -53,0 +53,0 @@ maxMass |
34990
Updatedatom-sorter@^0.5.10
Updatedchemical-elements@^0.5.10
Updatedmf-parser@^0.5.10
Updatedmf-utilities@^0.5.10