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

Review Utils functions for refactor or whether they're still needed #64

Closed kingo55 closed 4 years ago

kingo55 commented 4 years ago

Some of the utils functions may be replaceable (arrayIndexOf, extend, keys):

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

Older browsers are a dying breed and we probably don't need to offer shims for such old browsers that probably don't work on our clients' sites anyway.

kingo55 commented 4 years ago

@allmywant do you think we need these three functions in the Utils lib? Or are there better ways of getting what we need here?

allmywant commented 4 years ago

@kingo55

Anyway I think all three functions can be removed.

kingo55 commented 4 years ago

In the case of "extend", should we just leave that then?

It's probably easier to keep the utility function code separate from the constructor code.

I think the other two can probably be safely removed / replaced though.

allmywant commented 4 years ago

You're right @kingo55 , let's keep "extend" and remove arrayIndexOf, keys.

kingo55 commented 4 years ago

Addressed by #80