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

frame-throttle

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

frame-throttle - npm Package Versions

3.0.0

Diff

Changelog

Source

[3.0.0] - 2017-08-28

Added

  • Throttled listeners can now be canceled (useful for cleanup):
    var throttledListener = throttle(listener);
    window.addEventListener('resize', throttledListener);
    submitButton.addEventListener('click', () => {
      window.removeEventListener('resize', throttledListener);
      // prevent any queued calls from executing on the next animation frame:
      throttledListener.cancel();
    });
    

Changed

  • Updated types to use generics; throttle will now return a function of the same type it was passed.
  • frame-throttle now runs in strict mode

Fixed

  • Binding a throttled listener with .bind() resulted in both the bound and unbound listeners being throttled together.

    For instance, in the following scenario, listener was only being called once:

    var throttledListener = throttle(listener);
    var boundThrottledListener1 = throttledListener.bind(someContext);
    var boundThrottledListener2 = throttledListener.bind(anotherContext);
    
    throttledListener();
    boundThrottledListener1();
    boundThrottledListener2();
    
devrelm
published 2.0.1 •

Changelog

Source

[2.0.1] - 2016-09-26

Fixed

  • package.json was misconfigured and didn't include the correct files
devrelm
published 1.1.0 •

Changelog

Source

[1.1.0] - 2016-08-23

Fixed

  • When [requestAnimationFrame] does not exist, call the callback immediately and ignore further events for 1/60th of a second. Old behavior was to wait 1/60th of a second before calling callback.

Misc

  • Additional documentation in README
  • coveralls.io and travis badges in README
  • additional tests to cover setTimeout use case
devrelm
published 1.0.0 •

Changelog

Source

1.0.0 - 2016-07-30

Added

  • Initial release
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