Socket
Socket
Sign inDemoInstall

@repeaterjs/timers

Package Overview
Dependencies
1
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.3.0 to 0.3.1

4

package.json
{
"name": "@repeaterjs/timers",
"version": "0.3.0",
"version": "0.3.1",
"description": "Async iterator timer functions",

@@ -26,3 +26,3 @@ "repository": {

"dependencies": {
"@repeaterjs/repeater": "^1.0.0"
"@repeaterjs/repeater": "^2.0.0"
},

@@ -29,0 +29,0 @@ "devDependencies": {

@@ -24,3 +24,3 @@ # @repeaterjs/timers

const chan = new Repeater(async (push) => {
const repeater = new Repeater(async (push) => {
await push(1);

@@ -34,3 +34,3 @@ await push(2);

(async () => {
for await (const num of Repeater.race([chan, timeout(1000)])) {
for await (const num of Repeater.race([repeater, timeout(1000)])) {
console.log(num); // 1, 2

@@ -37,0 +37,0 @@ }

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc