esformatter-couchapp

1.0.1 • Public • Published

esformatter-couchapp

esformatter plugin to handle couchapp JS

couchapp allows CouchDB applications to be managed as regular files. The exported Javascript for views' map and reduce functions are typically of this form:

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

npm install --save-dev esformatter-couchapp

Then edit your package.json to include the plugin. The other lines are for illustration.

 
   "esformatter" : {
      "indent" : {
         "alignComments" : true,
         "value" : "  "
      },
      "plugins" : [
         "esformatter-couchapp"
      ],
      "root" : true,
      "whiteSpace" : {
         "removeTrailing" : 1,
         "value" : " "
      }
   },

/esformatter-couchapp/

    Package Sidebar

    Install

    npm i esformatter-couchapp

    Weekly Downloads

    3

    Version

    1.0.1

    License

    MIT

    Unpacked Size

    3.63 kB

    Total Files

    4

    Last publish

    Collaborators

    • hexten