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

poll

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

poll - npm Package Compare versions

Comparing version 3.2.0 to 3.2.1

2

LICENSE.txt

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

Copyright 2021 Philipp Rudloff
Copyright 2022 Philipp Rudloff

@@ -3,0 +3,0 @@ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

{
"name": "poll",
"version": "3.2.0",
"version": "3.2.1",
"license": "MIT",

@@ -34,3 +34,3 @@ "description": "A simple poll function based on async, await, and an infinite loop",

"scripts": {
"build": "NODE_ENV=production rollup --config",
"build": "rollup --config",
"test": "jest",

@@ -41,10 +41,12 @@ "prebuild": "npm run test",

"devDependencies": {
"@rollup/plugin-typescript": "^8.3.0",
"@types/jest": "^27.0.3",
"jest": "^27.3.1",
"rollup": "^2.60.1",
"@rollup/plugin-typescript": "^8.5.0",
"@types/jest": "^29.1.2",
"jest": "^29.2.0",
"jest-environment-jsdom": "^29.2.0",
"rollup": "^2.79.1",
"rollup-plugin-terser": "^7.0.2",
"ts-jest": "^27.0.7",
"typescript": "^4.5.2"
"ts-jest": "^29.0.3",
"tslib": "^2.4.0",
"typescript": "^4.8.4"
}
}

@@ -0,0 +0,0 @@ # poll

/**
* Calls a given function and keeps calling it after the specified delay has passed.
*
* @param fn The function to call.
* @param delayOrDelayCallback The delay (in milliseconds) to wait before calling the function again. Can be a function.
* @param shouldStopPolling A callback function indicating whether to stop polling.
*/
export declare function poll(
/**
* The function to call.
*/
fn: () => any,
/**
* The delay (in milliseconds) to wait before calling the function again. Can be a function.
*/
delayOrDelayCallback: number | (() => number),
shouldStopPolling: () => boolean | Promise<boolean>
/**
* A callback function indicating whether to stop polling.
*/
shouldStopPolling?: () => boolean | Promise<boolean>
): Promise<void>
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