jcampconverter
Advanced tools
Comparing version 3.0.1 to 3.0.2
{ | ||
"name": "jcampconverter", | ||
"version": "3.0.1", | ||
"version": "3.0.2", | ||
"description": "Parse and convert JCAMP data", | ||
@@ -12,4 +12,4 @@ "main": "./src/index.js", | ||
"eslint-fix": "npm run eslint -- --fix", | ||
"test": "run-s test-only eslint", | ||
"test-travis": "eslint src && jest --coverage", | ||
"test": "npm run test-coverage && npm run eslint", | ||
"test-coverage": "jest --coverage", | ||
"test-only": "jest", | ||
@@ -43,8 +43,6 @@ "build": "cheminfo build --root JcampConverter --no-source-map", | ||
"eslint-config-cheminfo": "^1.20.1", | ||
"eslint-plugin-import": "^2.17.1", | ||
"eslint-plugin-jest": "^22.4.1", | ||
"eslint-plugin-no-only-tests": "^2.3.0", | ||
"jest": "^24.7.1", | ||
"npm-run-all": "^4.1.3" | ||
"eslint-plugin-import": "^2.17.3", | ||
"eslint-plugin-jest": "^22.6.4", | ||
"jest": "^24.8.0" | ||
} | ||
} |
@@ -514,8 +514,14 @@ 'use strict'; | ||
} | ||
const firstX = spectra[0].data[0][0]; | ||
const lastX = spectra[0].data[0][spectra[0].data[0].length - 2]; // has to be -2 because it is a 1D array [x,y,x,y,...] | ||
const firstY = spectra[0].pageValue; | ||
const lastY = spectra[ySize - 1].pageValue; | ||
return { | ||
z: z, | ||
minX: spectra[0].data[0][0], | ||
maxX: spectra[0].data[0][spectra[0].data[0].length - 2], // has to be -2 because it is a 1D array [x,y,x,y,...] | ||
minY: spectra[0].pageValue, | ||
maxY: spectra[ySize - 1].pageValue, | ||
minX: Math.min(firstX, lastX), | ||
maxX: Math.max(firstX, lastX), | ||
minY: Math.min(firstY, lastY), | ||
maxY: Math.max(firstY, lastY), | ||
minZ: minZ, | ||
@@ -522,0 +528,0 @@ maxZ: maxZ, |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
43857
7
985