jcampconverter
Advanced tools
Comparing version 2.2.1 to 2.2.2
{ | ||
"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') { |
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
38307
705