/**
 * @license
 * touchtap-event <http://github.com/Tyriar/touchtap-event>
 * Copyright 2014 Daniel Imms <http://www.growingwiththeweb.com>
 * Released under the MIT license <http://github.com/Tyriar/touchtap-event/blob/master/LICENSE>
 */
(function () {
  'use strict';

  var touchTapEvent;
  var isTapLength;
  var tapLengthTimeout;
  var startPosition = { x: -1, y: -1 };
  var currentPosition = { x: -1, y: -1 };

  function getPointerEvent(e) {
    if (e.originalEvent && e.originalEvent.targetTouches) {
      return e.originalEvent.targetTouches[0];
    }
    if (e.targetTouches) {
      return e.targetTouches[0];
    }
    return e;
  }

  function approximatelyEqual(a, b) {
    return Math.abs(a - b) < 2;
  }

  function touchstart(e) {
    var pointerEvent = getPointerEvent(e);
    startPosition.x = pointerEvent.pageX;
    startPosition.y = pointerEvent.pageY;
    currentPosition.x = pointerEvent.pageX;
    currentPosition.y = pointerEvent.pageY;
    isTapLength = true;
    if (tapLengthTimeout) {
      clearTimeout(tapLengthTimeout);
    }
    tapLengthTimeout = setTimeout(function () {
      isTapLength = false;
    }, 200);
  }

  function touchend(e) {
    if (isTapLength &&
        approximatelyEqual(startPosition.x, currentPosition.x) &&
        approximatelyEqual(startPosition.y, currentPosition.y)) {
      touchTapEvent.customData = {
        touchX: currentPosition.x,
        touchY: currentPosition.y
      };
      e.target.dispatchEvent(touchTapEvent);
      // Prevent a ghost click on mobile browsers (delay click event unless
      // mobile viewport is present)
      e.preventDefault();
    }
  }

  function touchmove(e) {
    var pointerEvent = getPointerEvent(e);
    currentPosition.x = pointerEvent.pageX;
    currentPosition.y = pointerEvent.pageY;
  }

  function init() {
    touchTapEvent = document.createEvent('CustomEvent');
    touchTapEvent.initEvent('touchtap', true, true);
    document.addEventListener('touchstart', touchstart);
    document.addEventListener('touchend', touchend);
    document.addEventListener('touchcancel', touchend);
    document.addEventListener('touchmove', touchmove);
  }

  init();
})();

@@ -419,31 +419,186 @@
 %0A%0A  
-function getPointerEven
+/**%0A   * Gets the touch object from a touch* event.%0A   * @param %7BEvent%7D e The event.%0A   * @returns %7BTouch%7D The (first) touch object from the event.%0A   */%0A  function getTouchObjec
 t(e)
@@ -804,80 +804,361 @@
 %0A%0A  
-function approximatelyEqual(a, b) %7B%0A    return Math.abs(a - b) %3C 2;%0A  %7D%0A
+/**%0A   * Gets whether two numbers are approximately equal to each other.%0A   * @param %7Bnumber%7D a The first number.%0A   * @param %7Bnumber%7D b The second number.%0A   * @returns %7BBoolean%7D%0A   */%0A  function approximatelyEqual(a, b) %7B%0A    return Math.abs(a - b) %3C 2;%0A  %7D%0A%0A  /**%0A   * Handler for the touchstart event.%0A   * @param %7BEvent%7D The touchstart event.%0A   */
 %0A  f
@@ -1193,37 +1193,35 @@
 var 
-pointerEvent = getPointerEven
+touchObject = getTouchObjec
 t(e)
@@ -1240,35 +1240,34 @@
 osition.x = 
-pointerEven
+touchObjec
 t.pageX;%0A   
@@ -1281,35 +1281,34 @@
 osition.y = 
-pointerEven
+touchObjec
 t.pageY;%0A   
@@ -1324,35 +1324,34 @@
 osition.x = 
-pointerEven
+touchObjec
 t.pageX;%0A   
@@ -1367,35 +1367,34 @@
 osition.y = 
-pointerEven
+touchObjec
 t.pageY;%0A   
@@ -1575,24 +1575,113 @@
  200);%0A  %7D%0A%0A
+  /**%0A   * Handler for the touchend event.%0A   * @param %7BEvent%7D The touchend event.%0A   */%0A
   function t
@@ -2152,24 +2152,115 @@
 %0A    %7D%0A  %7D%0A%0A
+  /**%0A   * Handler for the touchmove event.%0A   * @param %7BEvent%7D The touchmove event.%0A   */%0A
   function t
@@ -2285,37 +2285,35 @@
 var 
-pointerEvent = getPointerEven
+touchObject = getTouchObjec
 t(e)
@@ -2338,27 +2338,26 @@
 ion.x = 
-pointerEven
+touchObjec
 t.pageX;
@@ -2385,19 +2385,18 @@
 y = 
-pointerEven
+touchObjec
 t.pa
@@ -2405,16 +2405,58 @@
 Y;%0A  %7D%0A%0A
+  /**%0A   * Initialises the library.%0A   */%0A
   functi

Add jsdoc to functions