Re: [nodejs] module.export

2013-11-11 Thread mscdex
On Monday, November 11, 2013 5:24:53 PM UTC-5, Alain Mouette wrote: > > Hi, I am new to Node.js too and this got me confused: > > What is the difference between > *exports.nyFunc = myfunc;* > and > *module.exports = ...* > > http://stackoverflow.com/questions/16383795/difference-between-module-exp

Re: [nodejs] module.export

2013-11-11 Thread Alain Mouette
Hi, I am new to Node.js too and this got me confused: What is the difference between *exports.nyFunc = myfunc;* and *module.exports = ...* thanks, Alain === Minha MesaXYZ: === Em 11-11-2013 19:23, Charles Angel escreveu: BOOM! Thank you...that was exactly

Re: [nodejs] module.export

2013-11-11 Thread Charles Angel
BOOM! Thank you...that was exactly what I was looking for. Much easier on the eyes and keeps everything away from Global Thanks for everyone who responded so quickly. On Monday, November 11, 2013 2:21:03 PM UTC-5, ajlopez wrote: > > Hmmm... maybe something like: > > function myfunction(...) {

Re: [nodejs] module.export

2013-11-11 Thread Angel Java Lopez
Hmmm... maybe something like: function myfunction(...) { ... } function MyDice() { ... // calling my function myfuncion() } function MyDie() { ... // calling my function myfuncion() } module.exports = { MyDice: MyDice, MyDie: MyDie } I don't sure you need to export myfunc

[nodejs] module.export

2013-11-11 Thread Charles Angel
I'm new to Node.js and finally making some headway before running into module.exports I wanted to separate some code out into an external file, so I created the file and called it probability.js The problem I ran into was having to define the function getRandomInt twice to allow it to be calle