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

an array is an object and indice are always converted to string #41

Closed lpatiny closed 7 years ago

lpatiny commented 7 years ago

It does not make sense to convert a string to a number to access an array index

Check in the console: var a = [5] a['0']

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