GitHub user carlosduclos opened an issue:
https://github.com/apache/couchdb-nano/issues/20
anonymous functions transpiled with babel don't work with _design docs in
couchdb
[Original issue](https://github.com/dscape/nano/issues/309)
__export-mike__
Hi I've been using nano and cradle and both libraries seem to have this
problem,
possibly this change should be fixed in couchdb.
flatiron/cradle#306
Have you encountered this issue before? How else could it be fixed?
__export-mike__
update from @janl flatiron/cradle#306 (comment)
__chirsfosterelli__
For what it's worth, we've dealt with that by doing this:
```javascript
const validate = function(newDoc, savedDoc, userCtx) {
// Content here
}.toString()
```
This results in validate being a stringified function that can be passed to
Nano, and babel will not name it.
----
----
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---