mf-generator
Advanced tools
Comparing version 2.0.3 to 2.0.4
@@ -220,11 +220,11 @@ 'use strict'; | ||
if (links.filter) { | ||
let stars = []; | ||
let sharps = []; | ||
for (let i = 0; i < keys.length; i++) { | ||
let anchors = keys[i][currents[i]].match(/#[0-9]+/g); | ||
if (anchors) stars.push(...anchors); | ||
if (anchors) sharps.push(...anchors); | ||
} | ||
if (stars.length % 2 === 1) return; | ||
stars = stars.sort(); | ||
for (let i = 0; i < stars.length; i += 2) { | ||
if (stars[i] !== stars[i + 1]) return; | ||
if (sharps.length % 2 === 1) return; | ||
sharps = sharps.sort(); | ||
for (let i = 0; i < sharps.length; i += 2) { | ||
if (sharps[i] !== sharps[i + 1]) return; | ||
} | ||
@@ -231,0 +231,0 @@ } |
{ | ||
"name": "mf-generator", | ||
"version": "2.0.3", | ||
"version": "2.0.4", | ||
"description": "Generate molecular formula based on a range and filters", | ||
@@ -23,7 +23,7 @@ "main": "lib/index.js", | ||
"dependencies": { | ||
"chemical-elements": "^2.0.0", | ||
"mf-finder": "^2.2.1", | ||
"mf-matcher": "^2.0.2", | ||
"mf-parser": "^2.1.0", | ||
"mf-utilities": "^2.0.1", | ||
"chemical-elements": "^2.0.1", | ||
"mf-finder": "^2.2.2", | ||
"mf-matcher": "^2.0.3", | ||
"mf-parser": "^2.2.0", | ||
"mf-utilities": "^2.0.2", | ||
"sum-object-keys": "^1.0.2" | ||
@@ -34,3 +34,3 @@ }, | ||
}, | ||
"gitHead": "293d2e42b8623a1b0092e968d5f84fc8cc25fd62" | ||
"gitHead": "91eb5af24bbad5cde6f018447f50552140253c2f" | ||
} |
@@ -211,11 +211,11 @@ import { ELECTRON_MASS } from 'chemical-elements'; | ||
if (links.filter) { | ||
let stars = []; | ||
let sharps = []; | ||
for (let i = 0; i < keys.length; i++) { | ||
let anchors = keys[i][currents[i]].match(/#[0-9]+/g); | ||
if (anchors) stars.push(...anchors); | ||
if (anchors) sharps.push(...anchors); | ||
} | ||
if (stars.length % 2 === 1) return; | ||
stars = stars.sort(); | ||
for (let i = 0; i < stars.length; i += 2) { | ||
if (stars[i] !== stars[i + 1]) return; | ||
if (sharps.length % 2 === 1) return; | ||
sharps = sharps.sort(); | ||
for (let i = 0; i < sharps.length; i += 2) { | ||
if (sharps[i] !== sharps[i + 1]) return; | ||
} | ||
@@ -222,0 +222,0 @@ } |
31155
Updatedchemical-elements@^2.0.1
Updatedmf-finder@^2.2.2
Updatedmf-matcher@^2.0.3
Updatedmf-parser@^2.2.0
Updatedmf-utilities@^2.0.2