[GH-ISSUE #36] about module.exports = function () {} #186

Closed
opened 2026-04-04 22:00:37 -06:00 by gitea-mirror · 1 comment
Owner

Originally created by @fiatjaf on GitHub (May 14, 2015).
Original GitHub issue: https://github.com/jo/couchdb-best-practices/issues/36

In https://github.com/eHealthAfrica/couchdb-best-practices/blob/gh-pages/README.md#modularize-view-code it is said that "Some features are not supported, for example the assignment of a function", but I'm on CouchDB 1.5 and I can assure I'm using a lot of

module.exports = function () {}

and they are all working. What is happening?

Originally created by @fiatjaf on GitHub (May 14, 2015). Original GitHub issue: https://github.com/jo/couchdb-best-practices/issues/36 In https://github.com/eHealthAfrica/couchdb-best-practices/blob/gh-pages/README.md#modularize-view-code it is said that _"Some features are not supported, for example the assignment of a function"_, but I'm on CouchDB 1.5 and I can assure I'm using a lot of ``` javascript module.exports = function () {} ``` and they are all working. What is happening?
Author
Owner

@jo commented on GitHub (May 14, 2015):

You're totally right! CouchDB has updated long time ago from CommonJS 1.1 to CommonJS 1.1.1.
@caolan has written a comprehensive blog post called CommonJS modules in CouchDB.

Thanks for reporting, I will fix this.

<!-- gh-comment-id:102145527 --> @jo commented on GitHub (May 14, 2015): You're totally right! CouchDB has updated long time ago from CommonJS 1.1 to [CommonJS 1.1.1](http://wiki.commonjs.org/wiki/Modules/1.1.1). @caolan has written a comprehensive blog post called [CommonJS modules in CouchDB](http://caolanmcmahon.com/posts/commonjs_modules_in_couchdb/). Thanks for reporting, I will fix this.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: github-starred/couchdb-best-practices#186
No description provided.