Nodejs命名模块的约定

鉴于这种模式:

模块定义了一个公共API,但需要运行时信息。

// Contrived example for a module abstracting a db module.exports = function (host, schema, ...) { // A "module-level", private, instance of an object // that will be used by the public API of the module var connection = getConnection(host, schema, ...); return { queryItems : function (arg) { // Something that uses both the "module" level instance // and runtime args. return connection.query(... arg ... ); } } }; 

另一个模块将不得不要求它,而不是“instanciate”模块,并使用它。

 // Module "bar" var db = require("db"), xxx = db("myhost", "myschema"); xxx.queryItems("Test"): 

在“传统的”OO中,第一个模块会暴露一个类的构造函数,按照惯例,这些模块会有第一个大写字母,所以你会写

 var Db = require("db"), db = new Db("....", "...."); 

没有歧义; “var cat = new Cat()”的意思是相当接受的。 “var felix = new Cat()”只能用于多个实例。

有没有一个“规范”/“惯用”的方式,在nodejs中,命名这样的模块暴露函数,以及该函数返回的对象?

(对不起,如果太主观,我正在寻找“既定的”惯例,而不是“最好的”惯例。)