Skip to content

Commit

Permalink
-n
Browse files Browse the repository at this point in the history
(#1387) - prototype based plugins api
  • Loading branch information
calvinmetcalf committed Feb 28, 2014
1 parent 6f7ae7e commit 9107edc
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions api.md
Original file line number Diff line number Diff line change
Expand Up @@ -742,3 +742,15 @@ db.revsDiff({
}
}
{% endhighlight %}

## Plugins<a id="plugins"></a>

Writing a plugin is easy the api is

{% highlight js %}
PouchDB.plugin({
methodName: function
});
{% endhighlight %}

This will add the function as a method of all databases with the given name, it will always be called in the so that `this` is db.

0 comments on commit 9107edc

Please sign in to comment.