Skip to content

Dexie.addons

David Fahlander edited this page May 6, 2014 · 11 revisions

This array contains functions that extends Dexie. An addon may register itself in Dexie.addons by using Dexie.addons.push(fn). Example:

(function(){

    function ForEachAddon (db) {
        // Makes it possible to use forEach() instead of each() on collections.
        db.Collection.prototype.forEach = db.Collection.prototype.each;
    }

    Dexie.addons.push(ForEachAddon);
})();
Clone this wiki locally