docs: function transform (fn, duration, then) {
      
      var tStart = Date.now();
      var end = 1;
      
  //
  // The parameters `duration` and `then` are both optional.
  //
      duration = typeof duration === "number" ? duration : DEFAULT_DURATION;
      then = typeof duration === "function" ? duration : then;
      then = typeof then === "function" ? then : function () {};
      
      function loop () {
          
          var tCurrent = Date.now() - tStart;
          var value = end * ((tCurrent / (duration / 100)) / 100);
          
          value = value > end ? end : value;
          
          if (tCurrent > duration || value === end) {
              fn(end);
              then();
              return;
          }
          
          fn(value);
          
          requestAnimationFrame(loop);
      }
      
      loop();
  }