code: function (data, circuitbreakerState, callback) {
  
          const responder = (circuitbreakerState===CB.OPEN) ? config.bypass : config.handler;
  
          // call the handler using its expected paradigm
          const promise = responder.length > 1
              ? new Promise(function(resolve, reject) {
                  responder(data, function(err, result) {
                      if (err) return reject(err);
                      resolve(result);
                  });
              })
              : Promise.resolve(responder(data));
  
          // provide an asynchronous response in the expected paradigm
          if (typeof callback !== 'function') return promise;
          promise.then(
              function (data) { callback(null, data); },
              function (err) { callback(err, null); }
          );
      }
docs: define the response function wrapper