Uh, doesn't it already work this way? mymodule.js: Math.abs = function() ... require('util').isset = function() ...
That being said, don't do this, modules/namespaces are there for very good reason. On Jun 1, 12:59 pm, Isaac Schlueter <i...@izs.me> wrote: > No, we're not going to do this. The module system is finished. It > won't be changing except for critical bugs. > > > > > > > > On Fri, Jun 1, 2012 at 12:57 PM, Alan Gutierrez <a...@prettyrobots.com> wrote: > > On Fri, Jun 01, 2012 at 12:42:42PM -0700, Martin Wawrusch wrote: > >> > >> > On Fri, Jun 1, 2012 at 2:26 PM, Seiji Sam Lee > >> > >> > <seijisam...@gmail.com> > >> > >> > wrote: > > >> > >> >> Due the great expectation around node.js, libs and functions grow > >> > >> >> up > >> > >> >> without control. > > >> > >> >> Nowadays we have a lot of "requires" and we need to memorize a lot > >> > >> >> of > >> > >> >> names (fs, path, vm, ...); with time, we'll spend more and more > >> > >> >> time > >> > >> >> reading > >> > >> >> documentation :-( > > >> > >> >> My proposal is incorporate the mechanism of "register" the module, > >> > for > >> > >> >> example, phpjs library could register the function "isset" into > >> > >> >> "utils", and > >> > >> >> "abs" function into "math" > > >> On Fri, Jun 1, 2012 at 12:39 PM, Joshua Holbrook > >> <josh.holbr...@gmail.com>wrote: > > >> > -1 as I like my modules exactly as they are. > > >> > --Josh > > >> -1 as well. Thank you Josh. > > > -1 > > > Perl has this, a default export. You'll need a switch to say that you don't > > want > > the default exports. Then you're going to need a way to remap the default > > exports. Pretty soon you're going to have Perl. > > > Actually, I am you're more likely to devolve into PHP, a global namespace > > full > > of suprises. > > > -- > > Alan Gutierrez - @bigeasy > > > -- > > 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 nodejs@googlegroups.com > > To unsubscribe from this group, send email to > > nodejs+unsubscr...@googlegroups.com > > For more options, visit this group at > >http://groups.google.com/group/nodejs?hl=en?hl=en -- 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 nodejs@googlegroups.com To unsubscribe from this group, send email to nodejs+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/nodejs?hl=en?hl=en