code: function newVisState(state, percentage, previous) {
      if (previous) {
        delete previous.previous;
      }
  
      return {
        code: state[0],
        state: state[1],
        percentage: percentage,
        previous: previous || {},
        fullyvisible: state[0] === STATES.FULLY_VISIBLE[0],
        visible: state[0] === STATES.VISIBLE[0] ||
        state[0] === STATES.FULLY_VISIBLE[0],
        hidden: state[0] === STATES.HIDDEN[0]
      };
    }
docs: @private
  @function
  @name newVisState
  @memberof VisSense~VisState
  
  @param {Array} state A state definition consisting of a code and a
  string representation.
  @param {number} percentage A number between 0 and 1 which represents
  the currently visible area of an element.
  @param {VisSense~VisState} [previous] The previous state of the element.
  
  @returns {VisSense~VisState} A state object.
  
  @description Constructs and returns a state object.
  
  @example
  
  var visElement = VisSense(element);
  
  visElement.isHidden();
  // => false