additional "require" argument for native module

47 views
Skip to first unread message

Pawel Por

unread,
Aug 28, 2014, 8:28:10 AM8/28/14
to nod...@googlegroups.com
Hi,

How can I receive additional "require" argument inside a native module.
Assume the following javascript code:
var user = require('./user')(client);

How can I receive "client" argument in a native module.
Could you please provide a short code snippet.

thanks

Floby

unread,
Aug 29, 2014, 5:35:08 AM8/29/14
to nod...@googlegroups.com


module.exports = function (client) {

Matt

unread,
Aug 29, 2014, 3:32:02 PM8/29/14
to nod...@googlegroups.com
module.exports = function (arg) { ... }


--
Job board: http://jobs.nodejs.org/
New group rules: https://gist.github.com/othiym23/9886289#file-moderation-policy-md
Old group rules: 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 unsubscribe from this group and stop receiving emails from it, send an email to nodejs+un...@googlegroups.com.
To post to this group, send email to nod...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/nodejs/b6eb3146-18f8-4cce-9fb1-711d6588d6c4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages