{% include anchor.html edit="true" title="Events" hash="events" %}
PouchDB is an [event emitter][event emitter] and will emit a `'created'` event when a database is created. A `'destroyed'` event is emitted when a database is destroyed.
{% highlight js %}
PouchDB.on('created', function (dbName) {
// called whenver a db is created.
});
PouchDB.on('destroyed', function (dbName) {
// called whenver a db is destroyed.
});
{% endhighlight %}