server.2016.SV.js
/**
 * Reads a file and converts its lines into an array.
 * Valid ONLY for files with ONE float value per line
 * @param {String} fileName The name of the file
 * @returns {array of floats} The array containing the floats 
 */
Reads a file and converts its lines into an array.
Valid ONLY for files with ONE float value per line
@param {String} fileName The name of the file
@returns {array of floats} The array containing the floats
Reads a file and converts its lines into an array . Valid ONLY for files with ONE float value per line @param { String } fileName The name of the file @returns { array of floats } The array containing the floats
function file2array(fileName) {
    return fs.readFileSync(fileName)
            .toString()
            .split("\n")
            .filter(function (e) {
                return e.length > 0;
            })
            .map(function (e) {
                return parseFloat(e);
            });
}
function file2array ( fileName ) { return fs . readFileSync ( fileName ) . toString ( ) . split ( "\n" ) . filter ( function ( e ) { return e . length > 0 ; } ) . map ( function ( e ) { return parseFloat ( e ) ; } ) ; }
Reads a file and converts its lines into an array.
Reads a file and converts its lines into an array .