NativeModule defined here https://github.com/joyent/node/blob/master/src/node.js#L676
It just returns itself if module id is 'native_module' https://github.com/joyent/node/blob/master/src/node.js#L687 Module._load defined here https://github.com/joyent/node/blob/master/lib/module.js#L275 четверг, 15 ноября 2012 г., 18:21:09 UTC+4 пользователь Angelo Chen написал: > > Hi, > > Thanks for the direction, but I found it at beg of module.js, it has a > line: > var NativeModule = require('native_module'); > is the require here refers to: > > Module.prototype.require = function(path) { > return Module._load(path, this); > }; > ? > > On Nov 15, 8:21 pm, Вадим Барышев <[email protected]> wrote: > > This is node.js function. You can start > > herehttps://github.com/joyent/node/blob/master/lib/module.js#L361 > > > > четверг, 15 ноября 2012 г., 16:17:32 UTC+4 пользователь Angelo Chen > написал: > > > > > > > > > > > > > > > > > > > > > Hi, > > > > > var fs = require('fs'); > > > I'd like to understand this a little more, require is part of v8 JS? > or > > > nodejs function? if yes, where can I find it in Nodejs's source code? > > > thanks, > > > > > Angelo > -- 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
