Add format_vectors_to_js and test case

Add a function to convert the input data into a javascript formatted
dictionary where vectors are contained. As well as a couple test cases.