cheminfo-js / spectra-data

Library to deal with spectra (IR, UV, ...), 1D NMR as well as 2D NMR
https://cheminfo-js.github.io/spectra-data
MIT License
4 stars 0 forks source link

Potential bug in fromJcamp #53

Closed stropitek closed 7 years ago

stropitek commented 7 years ago

https://github.com/cheminfo-js/spectra-data/blob/f6cea6a6ded24818ca3e478e73516f113b8dc91f/src/SD.js#L36

The user can override the xy parameter which changes how the spectra data points are represented. I think this parameter should be enforced to always be true, disregarding user input, otherwise it could lead to buggy behavior.

options = Object.assign({}, { keepSpectra: true, keepRecordsRegExp: /^.+$/}, options, {xy: true});