mf-from-google-sheet
Advanced tools
Comparing version
@@ -6,3 +6,3 @@ { | ||
}, | ||
"version": "0.4.3", | ||
"version": "0.5.0", | ||
"description": "Retrieve and format molecular formula from google sheet", | ||
@@ -25,7 +25,8 @@ "main": "src/index.js", | ||
"dependencies": { | ||
"mf-generator": "^0.4.3", | ||
"mf-parser": "^0.4.3", | ||
"mf-generator": "^0.5.0", | ||
"mf-parser": "^0.5.0", | ||
"papaparse": "^4.3.6", | ||
"request-promise": "^4.2.2" | ||
"request": "^2.83.0", | ||
"request-promise-native": "^1.0.5" | ||
} | ||
} |
@@ -8,3 +8,7 @@ 'use strict'; | ||
async function getReferenceList(url, urlReferences) { | ||
async function mfFromGoogleSheet(url, options = {}) { | ||
let { | ||
urlReferences | ||
} = options; | ||
if (urlReferences) { | ||
@@ -29,3 +33,3 @@ let results = await Promise.all([ | ||
var fields = parsed.meta.fields; | ||
var infoFields = fields.filter(a => !['mf', 'modif', 'ESI', 'MALDI', 'positive', 'negative'].includes(a)); | ||
var infoFields = fields.filter((a) => !['mf', 'modif', 'ESI', 'MALDI', 'positive', 'negative'].includes(a)); | ||
var formulas = parsed.data; | ||
@@ -115,3 +119,3 @@ | ||
module.exports = getReferenceList; | ||
module.exports = mfFromGoogleSheet; | ||
'use strict'; | ||
const request = require('request-promise'); | ||
const request = require('request-promise-native'); | ||
module.exports = async function fetchText(url) { | ||
return request(url); | ||
module.exports = function fetchText(url) { | ||
return request(url).promise(); | ||
}; |
7409
1.34%126
2.44%5
25%+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
Updated
Updated