Socket
Socket
Sign inDemoInstall

@effection/core

Package Overview
Dependencies
Maintainers
1
Versions
83
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@effection/core - npm Package Compare versions

Comparing version 2.0.0-preview.0-3257789 to 2.0.0-preview.0-57f61c8

4

package.json
{
"name": "@effection/core",
"version": "2.0.0-preview.0-3257789",
"version": "2.0.0-preview.0-57f61c8",
"main": "dist/index.js",

@@ -20,5 +20,5 @@ "types": "dist/index.d.ts",

"ts-node": "^8.8.2",
"tsdx": "^0.14.0",
"tsdx": "0.13.2",
"typescript": "^3.8.3"
}
}
import { Operation } from './operation';
export function sleep(duration: number): Operation<void> {
return (task) => (resolve) => {
let timeoutId = setTimeout(resolve, duration);
task.ensure(() => {
return function*() {
let timeoutId;
try {
yield new Promise((resolve) => {
setTimeout(resolve, duration);
});
} finally {
if(timeoutId) {
clearTimeout(timeoutId);
}
});
}
}
}
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