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 to 2.0.0-preview.0-2e4a035

2

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

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

import { Operation } from './operation';
export function sleep(duration: number): Operation<void> {
return function*() {
let timeoutId;
try {
yield new Promise((resolve) => {
setTimeout(resolve, duration);
});
} finally {
return (task) => (resolve) => {
let timeoutId = setTimeout(resolve, duration);
task.ensure(() => {
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