Open kingo55 opened 4 years ago
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.:
Mojito
// 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;
@kingo55 I think Mojito.init({ options }) is better.
Mojito.init({ options })
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.:Or is the current approach better? I.e. sane defaults hardcoded and users override specific options like: