jcampconverter
Advanced tools
Comparing version 7.0.0 to 7.1.0
@@ -0,1 +1,17 @@ | ||
# [7.1.0](https://github.com/cheminfo-js/jcampconverter/compare/v7.0.0...v7.1.0) (2020-06-11) | ||
### Bug Fixes | ||
* rename xUnit and yUnit to xUnits and yUnits ([d50c6fe](https://github.com/cheminfo-js/jcampconverter/commit/d50c6feb0db96e2bd10bdae70b6fead0b30ea1c3)) | ||
### BREAKING CHANGES | ||
* In the returned value the variables has been | ||
renamed to xUnits and yUnits to keep the LDR of | ||
the jcamp | ||
# [7.0.0](https://github.com/cheminfo-js/jcampconverter/compare/v6.0.1...v7.0.0) (2020-06-11) | ||
@@ -2,0 +18,0 @@ |
@@ -743,6 +743,6 @@ 'use strict'; | ||
if (currentEntry.ntuples.units.length > xIndex) { | ||
spectrum.xUnit = currentEntry.ntuples.units[xIndex]; | ||
spectrum.xUnits = currentEntry.ntuples.units[xIndex]; | ||
} | ||
if (currentEntry.ntuples.units.length > yIndex) { | ||
spectrum.yUnit = currentEntry.ntuples.units[yIndex]; | ||
spectrum.yUnits = currentEntry.ntuples.units[yIndex]; | ||
} | ||
@@ -756,4 +756,4 @@ } | ||
if (spectrum.observeFrequency) { | ||
if (spectrum.xUnit && spectrum.xUnit.toUpperCase() === 'HZ') { | ||
spectrum.xUnit = 'PPM'; | ||
if (spectrum.xUnits && spectrum.xUnits.toUpperCase() === 'HZ') { | ||
spectrum.xUnits = 'PPM'; | ||
spectrum.xFactor = spectrum.xFactor / spectrum.observeFrequency; | ||
@@ -937,5 +937,5 @@ spectrum.firstX = spectrum.firstX / spectrum.observeFrequency; | ||
} else if (canonicDataLabel === 'XUNITS') { | ||
spectrum.xUnit = dataValue; | ||
spectrum.xUnits = dataValue; | ||
} else if (canonicDataLabel === 'YUNITS') { | ||
spectrum.yUnit = dataValue; | ||
spectrum.yUnits = dataValue; | ||
} else if (canonicDataLabel === 'FIRSTX') { | ||
@@ -942,0 +942,0 @@ spectrum.firstX = parseFloat(dataValue); |
{ | ||
"name": "jcampconverter", | ||
"version": "7.0.0", | ||
"version": "7.1.0", | ||
"description": "Parse and convert JCAMP data", | ||
@@ -53,3 +53,2 @@ "main": "lib/index.js", | ||
"cheminfo-build": "^1.1.0", | ||
"cheminfo-tools": "^1.23.3", | ||
"eslint": "^6.8.0", | ||
@@ -56,0 +55,0 @@ "eslint-config-cheminfo": "^3.0.0", |
@@ -176,5 +176,5 @@ import { isMSField, convertMSFieldToLabel } from './complexChromatogram'; | ||
} else if (canonicDataLabel === 'XUNITS') { | ||
spectrum.xUnit = dataValue; | ||
spectrum.xUnits = dataValue; | ||
} else if (canonicDataLabel === 'YUNITS') { | ||
spectrum.yUnit = dataValue; | ||
spectrum.yUnits = dataValue; | ||
} else if (canonicDataLabel === 'FIRSTX') { | ||
@@ -181,0 +181,0 @@ spectrum.firstX = parseFloat(dataValue); |
@@ -65,8 +65,8 @@ export default function prepareNtuplesDatatable(currentEntry, spectrum, kind) { | ||
if (currentEntry.ntuples.units.length > xIndex) { | ||
spectrum.xUnit = currentEntry.ntuples.units[xIndex]; | ||
spectrum.xUnits = currentEntry.ntuples.units[xIndex]; | ||
} | ||
if (currentEntry.ntuples.units.length > yIndex) { | ||
spectrum.yUnit = currentEntry.ntuples.units[yIndex]; | ||
spectrum.yUnits = currentEntry.ntuples.units[yIndex]; | ||
} | ||
} | ||
} |
@@ -5,4 +5,4 @@ export default function prepareSpectrum(spectrum) { | ||
if (spectrum.observeFrequency) { | ||
if (spectrum.xUnit && spectrum.xUnit.toUpperCase() === 'HZ') { | ||
spectrum.xUnit = 'PPM'; | ||
if (spectrum.xUnits && spectrum.xUnits.toUpperCase() === 'HZ') { | ||
spectrum.xUnits = 'PPM'; | ||
spectrum.xFactor = spectrum.xFactor / spectrum.observeFrequency; | ||
@@ -9,0 +9,0 @@ spectrum.firstX = spectrum.firstX / spectrum.observeFrequency; |
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
83717
14