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

mf-parser

Package Overview
Dependencies
Maintainers
6
Versions
73
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mf-parser - npm Package Compare versions

Comparing version 0.5.2 to 0.5.8

8

package.json
{
"name": "mf-parser",
"version": "0.5.2",
"version": "0.5.8",
"description": "",

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

"dependencies": {
"atom-sorter": "^0.5.2",
"chemical-elements": "^0.5.2",
"mf-utilities": "^0.5.2"
"atom-sorter": "^0.5.8",
"chemical-elements": "^0.5.8",
"mf-utilities": "^0.5.8"
}
}

@@ -35,4 +35,8 @@ 'use strict';

'(CH(CH3)2)3N.2HCl': [{ kind: 'openingParenthesis', value: '(' }, { kind: 'atom', value: 'C' }, { kind: 'atom', value: 'H' }, { kind: 'openingParenthesis', value: '(' }, { kind: 'atom', value: 'C' }, { kind: 'atom', value: 'H' }, { kind: 'multiplier', value: 3 }, { kind: 'closingParenthesis', value: ')' }, { kind: 'multiplier', value: 2 }, { kind: 'closingParenthesis', value: ')' }, { kind: 'multiplier', value: 3 }, { kind: 'atom', value: 'N' }, { kind: 'salt', value: '.' }, { kind: 'preMultiplier', value: 2 }, { kind: 'atom', value: 'H' }, { kind: 'atom', value: 'Cl' }],
'C.C2.C3': [{ kind: 'atom', value: 'C' }, { kind: 'salt', value: '.' }, { kind: 'atom', value: 'C' }, { kind: 'multiplier', value: 2 }, { kind: 'salt', value: '.' }, { kind: 'atom', value: 'C' }, { kind: 'multiplier', value: 3 }],
'C10.C20.C30': [{ kind: 'atom', value: 'C' }, { kind: 'multiplier', value: 10 }, { kind: 'salt', value: '.' }, { kind: 'atom', value: 'C' }, { kind: 'multiplier', value: 20 }, { kind: 'salt', value: '.' }, { kind: 'atom', value: 'C' }, { kind: 'multiplier', value: 30 }],
'C.0.5H2O.0.6HCl': [{ kind: 'atom', value: 'C' }, { kind: 'salt', value: '.' }, { kind: 'preMultiplier', value: 0.5 }, { kind: 'atom', value: 'H' }, { kind: 'multiplier', value: 2 }, { kind: 'atom', value: 'O' }, { kind: 'salt', value: '.' }, { kind: 'preMultiplier', value: 0.6 }, { kind: 'atom', value: 'H' }, { kind: 'atom', value: 'Cl' }],
};
test('parse molecular formula', function () {

@@ -39,0 +43,0 @@ for (var key of Object.keys(tests)) {

@@ -50,3 +50,2 @@ 'use strict';

// it must be in a salt
} else if (ascii > 64 && ascii < 91) { // an uppercase = new atom

@@ -118,3 +117,5 @@ let value = this.getAtom(ascii);

let number = '';
let previous;
do {
previous = ascii;
number += String.fromCharCode(ascii);

@@ -125,3 +126,5 @@ this.i++;

// we need to deal with the case there is a from / to
if (previous === 46) this.i--;
let indexOfDash = number.indexOf('-', 1);
if (indexOfDash > -1) {

@@ -128,0 +131,0 @@ return { from: Number(number.substr(0, indexOfDash)), to: Number(number.substr(indexOfDash + 1)) };

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