title: File type from buffer using file-type
body: <p>I tried finding type of file using file-type module but when i try to run it gives me error that "error:.... fileType.fromBuffer is not a function.</p>
  
  <p>`</p>
  
  <pre><code>const fileType = require('file-type');
  const readChunk = require('read-chunk');
  exports.ext = async function(file) {
  const buffer = readChunk.sync(file, 0, 512)
  let type = await fileType.fromBuffer(buffer);
  console.log("type of file",type)
  return value
  </code></pre>
  
  <p>`</p>
  
  <p>this is in utils.js file and i am calling it in other type.js file</p>
  
  <p>`</p>
  
  <pre><code>var extension =  await utils.ext('ABC.png')
   console.log(extension)
  </code></pre>
  
  <p>`</p>
  
  <p>Can anybody tell me what should i do?</p>