GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.
Passed
Branch master (b17032)
by Keith
68:36
created

third-party/countUp.js-2.0.4/requestAnimationFrame.polyfill.js   A

Complexity

Total Complexity 7
Complexity/F 1.75

Size

Lines of Code 23
Function Count 4

Duplication

Duplicated Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 17
dl 0
loc 23
rs 10
c 0
b 0
f 0
wmc 7
mnd 3
bc 3
fnc 4
bpm 0.75
cpm 1.75
noi 0
1
// make sure requestAnimationFrame and cancelAnimationFrame are defined
2
// polyfill for browsers without native support
3
// by Opera engineer Erik Möller
4
(function () {
5
  var lastTime = 0;
6
  var vendors = ['webkit', 'moz', 'ms', 'o'];
7
  for (var x = 0; x < vendors.length && !window.requestAnimationFrame; ++x) {
8
    window.requestAnimationFrame = window[vendors[x] + 'RequestAnimationFrame'];
9
    window.cancelAnimationFrame = window[vendors[x] + 'CancelAnimationFrame'] ||
10
      window[vendors[x] + 'CancelRequestAnimationFrame'];
11
  }
12
  if (!window.requestAnimationFrame) {
13
    window.requestAnimationFrame = function (callback) {
14
      var currTime = new Date().getTime();
15
      var timeToCall = Math.max(0, 16 - (currTime - lastTime));
16
      var id = window.setTimeout(function () { return callback(currTime + timeToCall); }, timeToCall);
17
      lastTime = currTime + timeToCall;
18
      return id;
19
    };
20
  }
21
  if (!window.cancelAnimationFrame) {
22
    window.cancelAnimationFrame = function (id) {
23
      clearTimeout(id);
24
    };
25
  }
26
})();
27