New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.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 1.1.6 to 1.2.0

11

CHANGELOG.md

@@ -6,4 +6,15 @@ # Change Log

# [1.2.0](https://github.com/cheminfo/molecular-formula/compare/mf-generator@1.1.6...mf-generator@1.2.0) (2020-08-19)
### Features
* limit number of generated MF ([d361ed7](https://github.com/cheminfo/molecular-formula/commit/d361ed75f1d129fda64b19c2ee3cd421486aeeac))
## [1.1.6](https://github.com/cheminfo/molecular-formula/compare/mf-generator@1.1.5...mf-generator@1.1.6) (2020-04-18)
**Note:** Version bump only for package mf-generator

12

package.json
{
"name": "mf-generator",
"version": "1.1.6",
"version": "1.2.0",
"description": "",

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

"chemical-elements": "^1.1.5",
"mf-finder": "^1.1.5",
"mf-matcher": "^1.1.5",
"mf-parser": "^1.1.5",
"mf-utilities": "^1.1.5",
"mf-finder": "^1.1.6",
"mf-matcher": "^1.1.6",
"mf-parser": "^1.1.6",
"mf-utilities": "^1.2.0",
"sum-object-keys": "^1.0.2"
},
"gitHead": "9fcd8f8e0a32750245826401f8d53d567148353a"
"gitHead": "cfb4dd864b00757572700c8751b620d500682476"
}

@@ -39,4 +39,3 @@ 'use strict';

module.exports = function generateMFs(keys, options = {}) {
let { limit = 10000000, uniqueMFs = true, estimate = false } = options;
let { limit = 100000, uniqueMFs = true, estimate = false } = options;
if (uniqueMFs === true) options.canonizeMF = true;

@@ -69,3 +68,3 @@ if (options.canonizeMF === undefined) options.canonizeMF = true;

// there are ranges ... we are in trouble !
newParts = newParts.concat(processRange(part, comment));
newParts = newParts.concat(processRange(part, comment, { limit }));
} else {

@@ -113,7 +112,8 @@ newParts.push(parts[j]); // the part with the comments !

}
appendResult(results, currents, keys, options);
if (uniqueMFs) {
let uniqueMFsObject = {};
results.forEach((r) => {
uniqueMFsObject[r.mf + r.ionization.mf] = r;
results.forEach((result) => {
uniqueMFsObject[result.mf + result.ionization.mf] = result;
});

@@ -120,0 +120,0 @@ results = Object.keys(uniqueMFsObject).map((k) => uniqueMFsObject[k]);

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