cheminfo / convert-to-jcamp

Convert strings into JCAMP
https://cheminfo.github.io/convert-to-jcamp/
MIT License
0 stars 3 forks source link

xy-normalizer #4

Closed lpatiny closed 6 years ago

lpatiny commented 6 years ago

@maasencioh

xyConvert( object, options={})

Please could you make a new project that will normalize xy array whatever is the input

[ [x,y], [x,y], [x,y], [x,y], [x,y], ]

[ [x,x,x,x], [y,y,y,y,]]

[ {x:, y:}, {x:, y:}, {x:, y:}, {x:, y:}, {x:, y:}, {x:, y:}, ]

{x:[x,x,x,x,x,x,x], y:[y,y,y,y,y,y,y,y]}

I have the 4th kind and would like to create a jcamp. Like that your method can accept a little bit anything.

const { format } = options;

The format is detected automatically except in the case

[ [1,2], [2,3] ] that is ambiguous. It throws an error if format is unspecified

Format are static defined in this library

maasencioh commented 6 years ago

@lpatiny this should be added in which organization?

lpatiny commented 6 years ago

Good question. Could be mljs

maasencioh commented 6 years ago

https://github.com/mljs/xy-convert