New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

mf-from-google-sheet

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-from-google-sheet - npm Package Compare versions

Comparing version 1.1.40 to 1.2.0

18

package.json
{
"name": "mf-from-google-sheet",
"version": "1.1.40",
"version": "1.2.0",
"description": "Retrieve and format molecular formula from google sheet",
"main": "lib/index.js",
"module": "src/index.js",
"main": "src/index.js",
"files": [
"src",
"lib"
"src"
],

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

},
"homepage": "https://github.com/cheminfo/mass-tools/tree/main/packages/mf-from-google-sheet#readme",
"homepage": "https://github.com/cheminfo/mass-tools/tree/master/packages/mf-from-google-sheet#readme",
"dependencies": {
"cross-fetch": "^3.1.5",
"mf-generator": "^1.3.28",
"mf-parser": "^1.4.8",
"mf-utilities": "^1.4.2",
"mf-generator": "^1.4.0",
"mf-parser": "^1.5.0",
"mf-utilities": "^1.5.0",
"papaparse": "^5.3.2"
},
"gitHead": "bd2c06e05f2196c5f9c6ff011cf3ef41e1b6a0f9"
"gitHead": "ade929b07af4e2f0f8b3fe1aaf0df70c50f4b2db"
}

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

import { mfFromGoogleSheet } from '..';
'use strict';
let mfFromGoogleSheet = require('..');
// The original document is on: https://docs.google.com/spreadsheets/d/15Kuc5MeOhvm4oeTMvEuP1rWdRFiVWosxXhYwAmuf3Uo/edit#gid=0

@@ -15,2 +17,3 @@ test('getReferenceList with existing', async () => {

test('getReferenceList with non existing document', () => {
// eslint-disable-next-line jest/no-test-return-statement
return expect(

@@ -17,0 +20,0 @@ mfFromGoogleSheet(

@@ -1,8 +0,10 @@

import { generateMFs } from 'mf-generator';
import { MF } from 'mf-parser';
import Papa from 'papaparse';
'use strict';
import { fetchText } from './util/fetchText.js';
let generateMFs = require('mf-generator');
let MF = require('mf-parser/src/MF');
let Papa = require('papaparse');
export async function mfFromGoogleSheet(url, options = {}) {
const fetchText = require('./util/fetchText.js');
async function mfFromGoogleSheet(url, options = {}) {
let { urlReferences } = options;

@@ -29,2 +31,3 @@

let formulas = parsed.data;
let references = {};

@@ -76,6 +79,6 @@ if (tsvReferences) {

mf.filter = {
ESI: formula.ESI === 'X',
MALDI: formula.MALDI === 'X',
positive: formula.positive === 'X',
negative: formula.negative === 'X',
ESI: formula.ESI === 'X' ? true : false,
MALDI: formula.MALDI === 'X' ? true : false,
positive: formula.positive === 'X' ? true : false,
negative: formula.negative === 'X' ? true : false,
};

@@ -115,1 +118,3 @@ }

}
module.exports = mfFromGoogleSheet;

@@ -0,5 +1,7 @@

'use strict';
// eslint-disable-next-line no-shadow
import fetch from 'cross-fetch';
const fetch = require('cross-fetch');
export async function fetchText(url) {
module.exports = async function fetchText(url) {
const result = await fetch(url);

@@ -10,2 +12,2 @@ if (result.status !== 200) {

return result.text();
}
};
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