Socket
Socket
Sign inDemoInstall

lodash.throttle

Package Overview
Dependencies
Maintainers
3
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

lodash.throttle - npm Package Compare versions

Comparing version 4.0.0 to 4.0.1

18

index.js
/**
* lodash 4.0.0 (Custom Build) <https://lodash.com/>
* lodash 4.0.1 (Custom Build) <https://lodash.com/>
* Build: `lodash modularize exports="npm" -o ./`

@@ -25,3 +25,3 @@ * Copyright 2012-2016 The Dojo Foundation <http://dojofoundation.org/>

* **Note:** If `leading` and `trailing` options are `true`, `func` is invoked
* on the trailing edge of the timeout only if the the throttled function is
* on the trailing edge of the timeout only if the throttled function is
* invoked more than once during the `wait` timeout.

@@ -45,10 +45,10 @@ *

*
* // avoid excessively updating the position while scrolling
* // Avoid excessively updating the position while scrolling.
* jQuery(window).on('scroll', _.throttle(updatePosition, 100));
*
* // invoke `renewToken` when the click event is fired, but not more than once every 5 minutes
* // Invoke `renewToken` when the click event is fired, but not more than once every 5 minutes.
* var throttled = _.throttle(renewToken, 300000, { 'trailing': false });
* jQuery(element).on('click', throttled);
*
* // cancel a trailing throttled invocation
* // Cancel the trailing throttled invocation.
* jQuery(window).on('popstate', throttled.cancel);

@@ -67,3 +67,7 @@ */

}
return debounce(func, wait, { 'leading': leading, 'maxWait': wait, 'trailing': trailing });
return debounce(func, wait, {
'leading': leading,
'maxWait': wait,
'trailing': trailing
});
}

@@ -95,4 +99,2 @@

function isObject(value) {
// Avoid a V8 JIT bug in Chrome 19-20.
// See https://code.google.com/p/v8/issues/detail?id=2291 for more details.
var type = typeof value;

@@ -99,0 +101,0 @@ return !!value && (type == 'object' || type == 'function');

{
"name": "lodash.throttle",
"version": "4.0.0",
"version": "4.0.1",
"description": "The lodash method `_.throttle` exported as a module.",

@@ -8,3 +8,3 @@ "homepage": "https://lodash.com/",

"license": "MIT",
"keywords": "lodash, lodash-modularized, stdlib, util, throttle",
"keywords": "lodash-modularized, throttle",
"author": "John-David Dalton <john.david.dalton@gmail.com> (http://allyoucanleet.com/)",

@@ -11,0 +11,0 @@ "contributors": [

@@ -1,2 +0,2 @@

# lodash.throttle v4.0.0
# lodash.throttle v4.0.1

@@ -18,2 +18,2 @@ The [lodash](https://lodash.com/) method `_.throttle` exported as a [Node.js](https://nodejs.org/) module.

See the [documentation](https://lodash.com/docs#throttle) or [package source](https://github.com/lodash/lodash/blob/4.0.0-npm-packages/lodash.throttle) for more details.
See the [documentation](https://lodash.com/docs#throttle) or [package source](https://github.com/lodash/lodash/blob/4.0.1-npm-packages/lodash.throttle) for more details.

Sorry, the diff of this file is not supported yet

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