[ https://issues.apache.org/jira/browse/COUCHDB-1397?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13200384#comment-13200384 ]
Marcello Nuccio commented on COUCHDB-1397: ------------------------------------------ @Jason, I've found that, using valid Javascript in map/reduce, eases development for me, because I can use standard tools (uglifyjs, jshint, ...) without extra work. Moreover, I would also remove all global functions and inject them: function sampleMap(doc, view) { view.emit(doc._id, null); } because this makes unit testing much more easier than now. Ease of development and ease of testing it's much more relaxing for me, than the possibility to use anonymous functions. > Function expressions, evals in SpiderMonkey > ------------------------------------------- > > Key: COUCHDB-1397 > URL: https://issues.apache.org/jira/browse/COUCHDB-1397 > Project: CouchDB > Issue Type: Bug > Components: JavaScript View Server > Affects Versions: 1.2.1 > Environment: All > Reporter: Jason Smith > > New SpiderMonkey releases do not eval() a sole anonymous function expression. > That is not a valid JavaScript statement, and so it is not a valid JavaScript > script. > COUCHDB-1302 addressed this for 1.1 and the 1.1.x branch. This ticket is for > 1.2. (Sorry to spam COUCHDB-1302. I saw "Unassigned" and read "Unresolved.") -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira