Plugins have currently no way to access options passed to the Hoodie constructor. In order to make that possible, I’d suggest we allow to pass another argument to the hoodie.plugin(plugin), so that becomes possible:
hoodie.plugin(function (hoodie, options) {
hoodie.myMethod = function () {
// do something with options here
}
})
follow up for https://github.com/hoodiehq/hoodie/pull/711#issuecomment-306046905
Plugins have currently no way to access options passed to the
Hoodie
constructor. In order to make that possible, I’d suggest we allow to pass another argument to thehoodie.plugin(plugin)
, so that becomes possible: