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

mf-generator

Package Overview
Dependencies
Maintainers
1
Versions
94
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mf-generator - npm Package Compare versions

Comparing version 0.5.9 to 0.5.10

12

package.json
{
"name": "mf-generator",
"version": "0.5.9",
"version": "0.5.10",
"description": "",

@@ -21,9 +21,9 @@ "main": "src/index.js",

"dependencies": {
"chemical-elements": "^0.5.9",
"mf-finder": "^0.5.9",
"mf-matcher": "^0.5.9",
"mf-parser": "^0.5.9",
"mf-utilities": "^0.5.9",
"chemical-elements": "^0.5.10",
"mf-finder": "^0.5.10",
"mf-matcher": "^0.5.10",
"mf-parser": "^0.5.10",
"mf-utilities": "^0.5.10",
"sum-object-keys": "^1.0.2"
}
}

@@ -120,4 +120,4 @@ 'use strict';

// we need to calculate based on the mf but not very often ...
var mf = new MF(mfString);
var info = mf.getInfo();
let mf = new MF(mfString);
let info = mf.getInfo();
ems[mfString] = {

@@ -143,6 +143,6 @@ em: info.monoisotopicMass,

for (var i = 0; i < parts.length; i++) {
var part = parts[i][currents[i]];
for (let i = 0; i < parts.length; i++) {
let part = parts[i][currents[i]];
if (part) {
var info = getMonoisotopicMass(part);
let info = getMonoisotopicMass(part);
charge += info.charge;

@@ -179,7 +179,7 @@ em += info.em;

for (var ionization of ionizations) {
for (let ionization of ionizations) {
var result = getEMFromParts(keys, currents, ionization);
let result = getEMFromParts(keys, currents, ionization);
var match = matcher(result, filter);
let match = matcher(result, filter);
if (!match) return;

@@ -190,5 +190,5 @@ result.ms = match;

var comments = [];
for (var i = 0; i < keys.length; i++) {
var key = keys[i][currents[i]];
let comments = [];
for (let i = 0; i < keys.length; i++) {
let key = keys[i][currents[i]];
if (key) {

@@ -220,4 +220,4 @@ if (key.indexOf('$') > -1) {

var mfs = [];
for (var i = 0; i < parts.length; i++) {
var part = parts[i];
for (let i = 0; i < parts.length; i++) {
let part = parts[i];
if (!~part.search(/[0-9]-[0-9]/)) {

@@ -258,4 +258,4 @@ position++;

function getMF(mfs, currents, comment) {
var mf = '';
for (var i = 0; i < mfs.length; i++) {
let mf = '';
for (let i = 0; i < mfs.length; i++) {
if (currents[i] === 0) {

@@ -283,6 +283,6 @@ // TODO we need to remove from currents[i] till we reach another part of the MF

function removeMFLastPart(mf) {
var parenthesis = 0;
var start = true;
for (var i = mf.length - 1; i >= 0; i--) {
var ascii = mf.charCodeAt(i);
let parenthesis = 0;
let start = true;
for (let i = mf.length - 1; i >= 0; i--) {
let ascii = mf.charCodeAt(i);

@@ -289,0 +289,0 @@ if (ascii > 96 && ascii < 123) { // lowercase

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