New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

raf

Package Overview
Dependencies
Maintainers
1
Versions
24
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

raf - npm Package Compare versions

Comparing version 0.0.0 to 0.0.1

14

index.js
module.exports = raf
var EE = require('events').EventEmitter
, global = typeof window === 'undefined' ? this : window
var _raf =
this.requestAnimationFrame ||
this.webkitRequestAnimationFrame ||
this.mozRequestAnimationFrame ||
this.msRequestAnimationFrame ||
this.oRequestAnimationFrame ||
(this.setImmediate ? function(fn, el) {
global.requestAnimationFrame ||
global.webkitRequestAnimationFrame ||
global.mozRequestAnimationFrame ||
global.msRequestAnimationFrame ||
global.oRequestAnimationFrame ||
(global.setImmediate ? function(fn, el) {
setImmediate(fn)

@@ -43,2 +44,3 @@ } :

raf.polyfill = _raf
raf.now = function() { return Date.now() }
{
"name": "raf",
"version": "0.0.0",
"version": "0.0.1",
"description": "requestAnimationFrame polyfill library",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -21,6 +21,7 @@ # raf

## raf(element) -> event emitter
## raf([optional element]) -> event emitter
returns a event emitter that immediately starts emitting 'data'
events representing animation frames for a given element.
events representing animation frames for a given element (or for the entire
window, if no element is passed).

@@ -34,4 +35,8 @@ ## ee.pause() / ee.resume()

## raf.polyfill
the polyfilled `requestAnimationFrame` function.
# license
MIT
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