title: node.js data model object syntax
body: <p>I have a feeling this is a total noob question but I wasn't able to find any information so here goes.</p>
  
  <p>I need to "translate" php data model objects to JavaScript data model objects for a node.js project. I am pretty new to node.js and I simply don't understand the syntax of the data model objects.</p>
  
  <p>Here's the barebones template that was provided (user.js): </p>
  
  <pre><code>'use strict';
  
  module.exports = function UserModel() {
      return {
          name: 'username'
      };
  };
  </code></pre>
  
  <p>Here's part of the php model I am working off of:</p>
  
  <pre><code>class Model_User extends Base_Model {
      'name' =&gt; array(
          'first' =&gt; 'first_name',
          'last' =&gt; 'last_name',
      ),
  
      'friends' =&gt; array(
          'model' =&gt; 'User',
      ),
  }
  </code></pre>
  
  <p>I have written ActionScript data model objects in the past and I thought JS would be mostly identical but in AS the data properties are declared as separate vars. Looking at the barebones template above, that doesn't seem to be the case for node.js JS data model objects.</p>