Skip to content

Make options configurable on Mojito library init #67

@kingo55

Description

@kingo55

Currently default "Options" are intermingled with the library code which makes it awkward for users to override defaults.

https://github.com/kingo55/mojito-js-delivery/blob/9f313bd1ba59f1f8dcb80cc4df41b6b02b08f28c/lib/mojito.js#L4-L14

Might there be a way we could initialise Mojito explicitly? e.g.:

// lib code
...

Mojito.init({
  debug: false,
  cookieDuration: 7,
  ...
});

Or is the current approach better? I.e. sane defaults hardcoded and users override specific options like:

Mojito.options.excluded = true;

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions