How to Process the Multiline input in Node JS