code: function(storybook, baseUrl, previewRoute) {
    // clean baseUrl. remove query/hash/trailing-slash
    var urlObj = url.parse(baseUrl);
    urlObj = omit(urlObj, 'hash', 'search', 'query');
    urlObj.pathname = urlObj.pathname.replace(/\/$/, '');
    baseUrl = url.format(urlObj);
    // transform into states
    var states = [];
    storybook.forEach(function(component) {
      component.stories.forEach(function(story) {
        var previewUrl = baseUrl + previewRoute + '?dataId=0&selectedKind=' + encodeURIComponent(component.kind) + '&selectedStory=' + encodeURIComponent(story.name);
        var state = {
          url: previewUrl,
          name: component.kind + ': ' + story.name
        };
        if (story.steps) {
          state.steps = story.steps;
        }
        states.push(state);
      });
    });
    return states;
  }
docs: transform storybook object into screener states