title: Read strings line by line from Buffer instance in Node.js module
body: <p>I have a Node.js module which exports two functions <code>init(data)</code> , where <code>data</code> is <code>Buffer</code> ,and <code>test(word)</code> , where <code>word</code> is a string. </p>
  
  <p>I would like to read lines from <code>data</code> <code>Buffer</code> instance line by line inside <code>test()</code> function .</p>
  
  <p>I have no experience in Node.js, only JS. All I come to know from this stack is how to export multiple function from Node.js module.</p>
  
  <p>Here is function declaration so far: </p>
  
  <pre><code>module.exports = {
      init: function(data) {
  
      },
      test: function(word) {
  
      }
  }
  </code></pre>