esformatter plugin to handle couchapp javascript idioms
npm install esformatter-couchappjavascript
function(doc) {
if (doc.name) {
emit(doc.name, null);
}
}
`
Normally esformatter can't parse a plain anonymous function. This plugin enables esformatter to handle such files.
Install
`shell
npm install --save-dev esformatter-couchapp
`
Then edit your package.json to include the plugin. The other lines are for illustration.
`json
"esformatter" : {
"indent" : {
"alignComments" : true,
"value" : " "
},
"plugins" : [
"esformatter-couchapp"
],
"root" : true,
"whiteSpace" : {
"removeTrailing" : 1,
"value" : " "
}
},
``