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

Should I guess be a switch ? #38

Closed lpatiny closed 7 years ago

lpatiny commented 7 years ago

https://github.com/cheminfo-js/spectra-data/blob/e92167314d912e1ddd57169fb2d3f9d9b5110ff5/src/jcampEncoder/VectorEncoder.js#L28

Or you could define an object key : function

andcastillo commented 7 years ago

jajaja. That still java code. In java 6 you could only switch with integer values.