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
2
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.3.27 to 1.3.28

lib/index.js

24

package.json
{
"name": "mf-generator",
"version": "1.3.27",
"description": "",
"main": "src/index.js",
"version": "1.3.28",
"description": "Generate molecular formula based on a range and filters",
"main": "lib/index.js",
"module": "src/index.js",
"files": [
"src"
"src",
"lib"
],

@@ -19,9 +21,9 @@ "repository": {

},
"homepage": "https://github.com/cheminfo/mass-tools/tree/master/packages/mf-generator#readme",
"homepage": "https://github.com/cheminfo/mass-tools/tree/main/packages/mf-generator#readme",
"dependencies": {
"chemical-elements": "^1.2.3",
"mf-finder": "^1.4.1",
"mf-matcher": "^1.2.7",
"mf-parser": "^1.4.7",
"mf-utilities": "^1.4.1",
"chemical-elements": "^1.2.4",
"mf-finder": "^1.4.2",
"mf-matcher": "^1.2.8",
"mf-parser": "^1.4.8",
"mf-utilities": "^1.4.2",
"sum-object-keys": "^1.0.2"

@@ -32,3 +34,3 @@ },

},
"gitHead": "09dc5f380182d586410e390df190c8d27101fc3e"
"gitHead": "bd2c06e05f2196c5f9c6ff011cf3ef41e1b6a0f9"
}

@@ -15,3 +15,3 @@ # mf-generator

```js
const generateMFs = require('mf-generator');
const { generateMFs } = require('mf-generator');

@@ -18,0 +18,0 @@ const mfsArray = ['C,H,', 'Cl,Br'];

@@ -1,5 +0,3 @@

'use strict';
import { generateMFs } from '..';
const generateMFs = require('..');
describe('generateMFs', () => {

@@ -6,0 +4,0 @@ it('from array of array with comment', async () => {

@@ -1,9 +0,7 @@

'use strict';
import { toBeDeepCloseTo } from 'jest-matcher-deep-close-to';
const { toBeDeepCloseTo } = require('jest-matcher-deep-close-to');
import { generateMFs } from '..';
expect.extend({ toBeDeepCloseTo });
const generateMFs = require('..');
describe('generateMFs advanced', () => {

@@ -10,0 +8,0 @@ it('negative', async () => {

@@ -1,9 +0,6 @@

'use strict';
const { ELECTRON_MASS } = require('chemical-elements/src/constants');
const MF = require('mf-parser').MF;
const matcher = require('mf-matcher').msem;
const preprocessIonizations = require('mf-utilities/src/preprocessIonizations');
const processRange = require('mf-utilities/src/processRange');
const sum = require('sum-object-keys');
import { ELECTRON_MASS } from 'chemical-elements';
import { msemMatcher } from 'mf-matcher';
import { MF } from 'mf-parser';
import { processRange, preprocessIonizations } from 'mf-utilities';
import sum from 'sum-object-keys';
/**

@@ -47,3 +44,3 @@ * Generate all the possible combinations of molecular formula and calculate

module.exports = async function generateMFs(keys, options = {}) {
export async function generateMFs(keys, options = {}) {
options = { ...options };

@@ -155,3 +152,3 @@

return results;
};
}

@@ -203,3 +200,3 @@ let ems = {};

mw,
ionization: ionization,
ionization,
unsaturation: validUnsaturation ? unsaturation / 2 + 1 : undefined,

@@ -268,3 +265,3 @@ atoms,

let match = matcher(result, filter);
let match = msemMatcher(result, filter);
if (!match) continue;

@@ -271,0 +268,0 @@ result.ms = match.ms;

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