title: Reference Error: moment is not defined (Using moment.js)
body: <p>I installed the moment.js library and was about to play around with it a little bit, when i got this error. I've tried many different things, but nothing has worked. Any ideas?</p>
  
  <p>I have a folder that i've installed moment.js into (npm install moment) and i'm running my program (node isDate.js). </p>
  
  <pre><code>import {moment} from 'moment';
  
  function isDate(string) {
      {
          moment(string).format(["MM-DD-YYYY", "YYYY-MM-DD"]);
      }
  } exports.isDate = isDate;
  </code></pre>
  
  <p>ReferenceError: moment is not defined</p>