Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@essentials/raf

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@essentials/raf - npm Package Compare versions

Comparing version 1.0.0 to 1.0.1

25

dist/main/index.js

@@ -13,6 +13,3 @@ 'use strict'

if (win) {
let vps = ['webkit', 'moz', 'ms', 'o'],
vp = null,
i = 0,
af = 'AnimationFrame',
let af = 'AnimationFrame',
Raf = 'Request' + af

@@ -22,13 +19,17 @@ exports.raf = raf = win.requestAnimationFrame.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) {
for (; i < vps.length; i++) {
vp = vps[i]
exports.raf = raf = raf || win[vp + Raf]
exports.caf = caf =
caf || win[vp + 'Cancel' + af] || win[vp + 'Cancel' + Raf]
}
// eslint-disable-next-line no-extra-semi
;['webkit', 'moz', 'ms', 'o'].forEach(_ref)
}
}
function _ref(h) {
function _ref2(h) {
return clearTimeout(h)

@@ -48,3 +49,3 @@ }

exports.caf = caf = _ref
exports.caf = caf = _ref2
}

@@ -7,6 +7,3 @@ let p = typeof performance !== 'undefined' ? performance : Date

if (win) {
let vps = ['webkit', 'moz', 'ms', 'o'],
vp = null,
i = 0,
af = 'AnimationFrame',
let af = 'AnimationFrame',
Raf = 'Request' + af

@@ -16,12 +13,16 @@ raf = win.requestAnimationFrame.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) {
for (; i < vps.length; i++) {
vp = vps[i]
raf = raf || win[vp + Raf]
caf = caf || win[vp + 'Cancel' + af] || win[vp + 'Cancel' + Raf]
}
// eslint-disable-next-line no-extra-semi
;['webkit', 'moz', 'ms', 'o'].forEach(_ref)
}
}
function _ref(h) {
function _ref2(h) {
return clearTimeout(h)

@@ -41,5 +42,5 @@ }

caf = _ref
caf = _ref2
}
export {raf, caf}
{
"name": "@essentials/raf",
"version": "1.0.0",
"version": "1.0.1",
"homepage": "https://github.com/jaredLunde/essentials/tree/master/packages/raf#readme",

@@ -5,0 +5,0 @@ "repository": "github:jaredLunde/essentials",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc