It doesn't really matter how modules are named within node.js, as when you only
ever use the name at two different times:
1) When installing the module, usually:
npm install [module]
2) When requiring the module:
var MyModule = require("module-name");
As you can rename what you reference the module contents as when you require it,
the naming of the module isn't super important.
Generally I use node-[module-name], if it's a specific client or server for a protocol, I
suffix it appropriately, as to avoid confusion when people are looking for modules.
Hopefully this helps somewhat,
Yours,
Micheil Smith
--
BrandedCode.com
> --
> You received this message because you are subscribed to the Google Groups "nodejs" group.
> To post to this group, send email to nod...@googlegroups.com.
> To unsubscribe from this group, send email to nodejs+un...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/nodejs?hl=en.
>
lower-case with hyphens is easy to read and type,
prefixing with node is annoying.
And if they manage to consolidate their plugin to a single script,
only 42 lines long. The module must be name "the-hoff"
--
You received this message because you are subscribed to the Google Groups "nodejs" group.
To post to this group, send email to nod...@googlegroups.com.
To unsubscribe from this group, send email to nodejs+un...@googlegroups.com.
I generally try to avoid hyphens in javascript, down the line it can break programatically working with them, see the CSS attributes problem as an example, ie marginTop vs margin-top. Underscores or dromedarCase seem just as functional with less issues.
On Wed, Oct 27, 2010 at 10:59 PM, Dean Landolt <de...@deanlandolt.com> wrote:
On Wed, Oct 27, 2010 at 10:52 AM, Joe Developer <joe.d.d...@gmail.com> wrote:
I generally try to avoid hyphens in javascript, down the line it can break programatically working with them, see the CSS attributes problem as an example, ie marginTop vs margin-top. Underscores or dromedarCase seem just as functional with less issues.
If we're talking about module names they'll always be a string when you require them. Yes, it means you have to use something other than a hyphen for the symbol you assign them to, but that's no big deal. Perhaps underscores would be better but hyphens have sorta become defacto. The important thing is: don't use upper case letters...please...Windows is stoopid.Right, but a minor point is that someone, somewhen might want to programmatically but them into a js object, should they do a sanity check first? Sure! Should they run into a collision when module foo-bar and the internal transformation hits the existing fooBar? Doesn't need to happen. Anyway.