nl_tokens: LOAD_AS_FILE ( X ) 1 . If X is a file load X as JavaScript text . STOP 2 . If X . js is a file load X . js as JavaScript text . STOP 3 . If X . json is a file parse X . json to a JavaScript Object . STOP 4 . If X . node is a file load X . node as binary addon . STOP
pl_tokens: function load_as_file ( <mask> , startpath ) { var module_path ; var resolved_path = path . posix . resolve ( startpath , request ) ; _ . includes ( registry . files , resolved_path ) && ( module_path = resolved_path ) ; if ( module_path ) { // logger.trace("file found: " + module_path); return module_path ; } var extension = path . extname ( request ) ; if ( ! extension ) { var exts = [ ".js" , ".json" ] ; _ . forEach ( exts , function ( ext ) { resolved_path = path . posix . resolve ( startpath , request + ext ) ; _ . includes ( registry . files , resolved_path ) && ( module_path = resolved_path ) ; if ( ! module_path ) { return ! module_path ; } } ) ; } return module_path ; }