a module in node (which gets its notions from CommonJS) is a javascript 
value you can get by using the `require` function. Each module is addressed 
by a string that gets resolved to a filename. There is a 1-to-1 
relationship between that javascript value and the filename path.

Classes don't exist in javascript. We've got constructor functions, which 
can work quite similarily. You can exports constructor functions from your 
modules like this

module.exports = function MyConstructor() {}

On Friday, 22 November 2013 17:40:53 UTC+1, Reza Razavipour wrote:
>
> I am not clear what the difference is referring to a module and a generic 
> class/function that i create and use.
>
> Can someone care to explain
>

-- 
-- 
Job Board: http://jobs.nodejs.org/
Posting guidelines: 
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because you are subscribed to the Google
Groups "nodejs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en

--- 
You received this message because you are subscribed to the Google Groups 
"nodejs" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to