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

jcampconverter

Package Overview
Dependencies
Maintainers
3
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 2.2.1 to 2.2.2

2

bower.json
{
"name": "jcampconverter",
"version": "2.2.1",
"version": "2.2.2",
"main": [

@@ -5,0 +5,0 @@ "dist/jcampconverter.js",

{
"name": "jcampconverter",
"version": "2.2.1",
"version": "2.2.2",
"description": "Parse and convert JCAMP data",

@@ -5,0 +5,0 @@ "main": "./src/index.js",

@@ -9,2 +9,3 @@ 'use strict';

var peakTableSplitRegExp = /[,\t ]+/;
var ntuplesSeparator = /[, \t]{1,}/;
var DEBUG = false;

@@ -133,2 +134,6 @@

}
} else if (dataLabel === 'NTUPLES') {
if (dataValue.indexOf('nD') > -1) {
result.twoD = true;
}
} else if (dataLabel === 'XUNITS') {

@@ -173,26 +178,26 @@ spectrum.xUnit = dataValue;

} else if (dataLabel === 'VARNAME') {
ntuples.varname = dataValue.split(/[, \t]{2,}/);
ntuples.varname = dataValue.split(ntuplesSeparator);
} else if (dataLabel === 'SYMBOL') {
ntuples.symbol = dataValue.split(/[, \t]{2,}/);
ntuples.symbol = dataValue.split(ntuplesSeparator);
} else if (dataLabel === 'VARTYPE') {
ntuples.vartype = dataValue.split(/[, \t]{2,}/);
ntuples.vartype = dataValue.split(ntuplesSeparator);
} else if (dataLabel === 'VARFORM') {
ntuples.varform = dataValue.split(/[, \t]{2,}/);
ntuples.varform = dataValue.split(ntuplesSeparator);
} else if (dataLabel === 'VARDIM') {
ntuples.vardim = convertToFloatArray(dataValue.split(/[, \t]{2,}/));
ntuples.vardim = convertToFloatArray(dataValue.split(ntuplesSeparator));
} else if (dataLabel === 'UNITS') {
ntuples.units = dataValue.split(/[, \t]{2,}/);
ntuples.units = dataValue.split(ntuplesSeparator);
} else if (dataLabel === 'FACTOR') {
ntuples.factor = convertToFloatArray(dataValue.split(/[, \t]{2,}/));
ntuples.factor = convertToFloatArray(dataValue.split(ntuplesSeparator));
} else if (dataLabel === 'FIRST') {
ntuples.first = convertToFloatArray(dataValue.split(/[, \t]{2,}/));
ntuples.first = convertToFloatArray(dataValue.split(ntuplesSeparator));
} else if (dataLabel === 'LAST') {
ntuples.last = convertToFloatArray(dataValue.split(/[, \t]{2,}/));
ntuples.last = convertToFloatArray(dataValue.split(ntuplesSeparator));
} else if (dataLabel === 'MIN') {
ntuples.min = convertToFloatArray(dataValue.split(/[, \t]{2,}/));
ntuples.min = convertToFloatArray(dataValue.split(ntuplesSeparator));
} else if (dataLabel === 'MAX') {
ntuples.max = convertToFloatArray(dataValue.split(/[, \t]{2,}/));
ntuples.max = convertToFloatArray(dataValue.split(ntuplesSeparator));
} else if (dataLabel === '.NUCLEUS') {
if (result.twoD) {
result.yType = dataValue.split(/[, \t]{2,}/)[0];
result.yType = dataValue.split(ntuplesSeparator)[0];
}

@@ -199,0 +204,0 @@ } else if (dataLabel === 'PAGE') {

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