Socket
Socket
Sign inDemoInstall

debounce-promise

Package Overview
Dependencies
Maintainers
1
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

debounce-promise - npm Package Compare versions

Comparing version 2.0.0 to 2.0.1

3

dist/index.js

@@ -23,2 +23,4 @@ /* global setTimeout, clearTimeout */

return function () {
var _this = this;
for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {

@@ -38,2 +40,3 @@ args[_key] = arguments[_key];

reject = _reject;
onTimeout = run.bind(_this, nextArgs, resolve, reject);
});

@@ -40,0 +43,0 @@ }

@@ -19,2 +19,3 @@ /* global setTimeout, clearTimeout */

reject = _reject
onTimeout = run.bind(this, nextArgs, resolve, reject)
})

@@ -21,0 +22,0 @@ }

2

package.json
{
"name": "debounce-promise",
"version": "2.0.0",
"version": "2.0.1",
"description": "Create a debounced version of a promise returning function",

@@ -5,0 +5,0 @@ "main": "dist/index",

@@ -8,2 +8,10 @@ /* global setTimeout */

}
test('returns the result of a single operation ', async t => {
const debounced = debounce(async (value) => value, 100)
const promise = debounced('foo')
const result = await promise
t.equal(result, 'foo')
})
test('returns the result of the latest operation ', async t => {

@@ -10,0 +18,0 @@ const debounced = debounce(async (value) => value, 100)

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