@essentials/raf
Advanced tools
Comparing version 1.0.1 to 1.0.2
@@ -14,21 +14,9 @@ 'use strict' | ||
let af = 'AnimationFrame', | ||
Raf = 'Request' + af | ||
exports.raf = raf = win.requestAnimationFrame.bind(win) | ||
exports.caf = caf = win.cancelAnimationFrame.bind(win) | ||
function _ref(vp) { | ||
//@ts-ignore | ||
exports.raf = raf = raf || win[vp + Raf] //@ts-ignore | ||
exports.caf = caf = | ||
caf || win[vp + 'Cancel' + af] || win[vp + 'Cancel' + Raf] | ||
} | ||
if (!raf || !caf) { | ||
// eslint-disable-next-line no-extra-semi | ||
;['webkit', 'moz', 'ms', 'o'].forEach(_ref) | ||
} | ||
Caf = 'cancel' + af, | ||
Raf = 'request' + af | ||
exports.raf = raf = win[Raf] !== void 0 && win[Raf].bind(win) | ||
exports.caf = caf = win[Caf] !== void 0 && win[Caf].bind(win) | ||
} | ||
function _ref2(h) { | ||
function _ref(h) { | ||
return clearTimeout(h) | ||
@@ -48,3 +36,3 @@ } | ||
exports.caf = caf = _ref2 | ||
exports.caf = caf = _ref | ||
} |
@@ -8,20 +8,9 @@ let p = typeof performance !== 'undefined' ? performance : Date | ||
let af = 'AnimationFrame', | ||
Raf = 'Request' + af | ||
raf = win.requestAnimationFrame.bind(win) | ||
caf = win.cancelAnimationFrame.bind(win) | ||
function _ref(vp) { | ||
//@ts-ignore | ||
raf = raf || win[vp + Raf] //@ts-ignore | ||
caf = caf || win[vp + 'Cancel' + af] || win[vp + 'Cancel' + Raf] | ||
} | ||
if (!raf || !caf) { | ||
// eslint-disable-next-line no-extra-semi | ||
;['webkit', 'moz', 'ms', 'o'].forEach(_ref) | ||
} | ||
Caf = 'cancel' + af, | ||
Raf = 'request' + af | ||
raf = win[Raf] !== void 0 && win[Raf].bind(win) | ||
caf = win[Caf] !== void 0 && win[Caf].bind(win) | ||
} | ||
function _ref2(h) { | ||
function _ref(h) { | ||
return clearTimeout(h) | ||
@@ -41,5 +30,5 @@ } | ||
caf = _ref2 | ||
caf = _ref | ||
} | ||
export {raf, caf} |
{ | ||
"name": "@essentials/raf", | ||
"version": "1.0.1", | ||
"version": "1.0.2", | ||
"homepage": "https://github.com/jaredLunde/essentials/tree/master/packages/raf#readme", | ||
@@ -5,0 +5,0 @@ "repository": "github:jaredLunde/essentials", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
6074
59