Skip to content

plugin.defaults can be a function, called before anything else, returning the defaults object #940

Open
@rjrodger

Description

this allows the default options to be build dynamically

also allows passing in seneca, and thus gubu, maintaining version matching

function myplugin(options) { ... }
myplugin.defaults = (seneca)=>{
  const { Open } = seneca.valid
  return Open({
    settingA: 1
  })
}

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions