it's a bit ugly i guess, but there is nothing wrong with it. that it's named exports tells you quite a lot actually.
On Sat, Apr 28, 2012 at 4:54 PM, akira <nhy...@googlemail.com> wrote: > I am sorry if this is not node related, I just thought this might be a > good place to ask since a lot of module developers are on this list. > > Using this simple example, I would like to inherit a form > > exports.EmailForm = forms.Form.extend({ > email_address : forms.EmailField({required: true}) > }) > > exports.ExtendedEmailForm = exports.EmailForm.extend({ // <- Extending > EmailForm > subject : forms.CharField({maxLength: 100}) > , message : forms.CharField() > , sender : forms.EmailField({required: true}) > }) > > > Is this a misuse? It works, but normally one would do something like > this: > > var EmailForm = forms.Form.extend({ > email_address : forms.EmailField({required: true}) > }) > > > But I would like to export the simple EmailForm class for usage in > other modules too. Thanks > > -- > 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