jo / couchdb-best-practices

Collect best practices around the CouchDB universe.
https://jo.github.io/couchdb-best-practices/
Other
321 stars 33 forks source link

about module.exports = function () {} #36

Closed fiatjaf closed 9 years ago

fiatjaf commented 9 years ago

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?

jo commented 9 years ago

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.