Skip to content
This repository has been archived by the owner on Nov 5, 2018. It is now read-only.

anonymous functions transpiled with babel don't work with _design docs in couchdb #309

Open
export-mike opened this issue Jan 24, 2016 · 3 comments

Comments

@export-mike
Copy link

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
Copy link
Author

update from @janl flatiron/cradle#306 (comment)

@chrisfosterelli
Copy link

chrisfosterelli commented May 18, 2016

For what it's worth, we've dealt with that by doing this:

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.

@carlosduclos
Copy link

This repository has been merged into apache/couchdb-nano, please continue the discussion here

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants