Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

jcampconverter

Package Overview
Dependencies
Maintainers
8
Versions
98
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

jcampconverter - npm Package Compare versions

Comparing version 7.0.0 to 7.1.0

16

History.md

@@ -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 @@

12

lib/index.js

@@ -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;

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