Last active
January 24, 2016 11:54
-
-
Save export-mike/322e6c340294113096b6 to your computer and use it in GitHub Desktop.
Problems with babel anonymous functions becoming named breaks couchdb.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Before transpile | |
couchDesignDoc('User', { | |
email: { | |
map: (doc) => { | |
if(doc.type === 'User') { | |
emit(doc.email, doc); | |
} | |
} | |
} | |
}); | |
//after transpile becomes broken in couchdb | |
couchDesignDoc('User', { | |
email: { | |
map: function map (doc) { | |
if(doc.type === 'User') { | |
emit(doc.email, doc); | |
} | |
} | |
} | |
}); | |
// Before transpile | |
couchDesignDoc('User', { | |
email: { | |
map: function (doc) { | |
if(doc.type === 'User') { | |
emit(doc.email, doc); | |
} | |
} | |
} | |
}); | |
//after transpile becomes broken in couchdb | |
couchDesignDoc('User', { | |
email: { | |
map: function map (doc) { | |
if(doc.type === 'User') { | |
emit(doc.email, doc); | |
} | |
} | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment