pushtell / react-ab-test

A/B testing React components and debug tools. Isomorphic with a simple, universal interface. Well documented and lightweight. Tested in popular browsers and Node.js. Includes helpers for Mixpanel and Segment.com.
MIT License
752 stars 112 forks source link

Question: Experiment removal #53

Open evaughn opened 5 years ago

evaughn commented 5 years ago

Is there a public method for removing experiments? Digging into the emitter source, I saw that there was rewind, which removes all experiments. But I was wondering if there is a method was defined to remove specific experiments? Something like:

PushtellEventEmitter.prototype.remove = function(experimentName) {
   if (experiments[experimentName]) {
      delete experiments[experimentName]
  } 

    if (playedExperiments[experimentName]) {
      delete playedExperiments[experimentName]
    }
}
pepf commented 5 years ago

I might need this method as well, working on a more custom reporting module based on specific experiment events :) Are PR's accepted for this issue?