0.0.9 • Published 12 months ago

@sunney/tasks v0.0.9

Weekly downloads
-
License
MIT
Repository
-
Last release
12 months ago

tasks

Install

npm install @sunney/tasks

Usage

import { task } from '@sunney/tasks';

// create a task
task(async () => {
  await fetch(...)
})

// delay a task for 5 seconds
task(async () => {
  await fetch(...)
}).delay(5, "seconds")

// repeat a task every 5 seconds
task(async () => {
  await fetch(...)
}).repeat(5, "seconds")

// schedule a task to run at 12:00:00
task(async () => {
  await fetch(...)
}).schedule(new Date("12:00:00"))
0.0.9

12 months ago

0.0.7

1 year ago

0.0.6

1 year ago

0.0.5

1 year ago

0.0.4

1 year ago

0.0.3

1 year ago

0.0.2

1 year ago

0.0.1

1 year ago