mint-metrics / mojito-js-delivery

🧪 Source-controlled JS split testing framework for building and launching A/B tests.
https://mojito.mx/docs/js-delivery-intro
Other
16 stars 29 forks source link

Should "Options.excluded" assignment be moved to the start of the lib? #62

Closed kingo55 closed 4 years ago

kingo55 commented 4 years ago

Should this block be moved into the "Options" defaults definition at the start?

    // General Mojito exclude feature
    // Mojito.options.excluded can be a boolean value or a function
    Options.excluded = !navigator.cookieEnabled;

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

Into this definition:

    var Options = {
        debug: false,
        // cookie duration (in days)
        cookieDuration: 60,
        // max length of error message
        maxErrorStackLength: 1000,
        // checking interval of utils.waitUntil
        waitInterval: 50,
        // default timeout of utils.waitUntil
        defaultWaitTimeout: 2000
    };
allmywant commented 4 years ago

You're right @kingo55 , we can do that.

kingo55 commented 4 years ago

addressed by #77