GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - thunks/thunk-queue: Thunk queue for uncertainty tasks evaluation.

This repository was archived by the owner on Aug 17, 2023. It is now read-only.
BranchesTags
Open more actions menu

Latest commit

 

History

12 Commits
12 Commits

Folders and files

NameName
Last commit message
Last commit date
test
test
 
 
.gitignore
.gitignore
 
 
.travis.yml
.travis.yml
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
index.js
index.js
 
 
package.json
package.json
 
 

Repository files navigation

thunk-queue

Thunk queue for uncertainty tasks evaluation.

NPM version Build Status Downloads

thunks

Demo

const thunkQueue = require('thunk-queue')
const queueT = thunkQueue()

queueT(function(err, res) {
  // It is will be run after all thunkable task finished in queue.
  console.log(err, res)
})

queueT.push(1) // push a primitive value to queue
queueT.push(Promise.resolve(1)) // push a promise to queue

// queueT.push(...), support all thunkable value, such as primitive value, thunk function, promise, generator object, generator function...

queueT.end() // end the queue.

Installation

npm install thunk-queue

API

const thunkQueue = require('thunk-queue')

thunkQueue([thunkable])

Return a thunk function with a closure queue.

const queueT = thunkQueue()

queueT.push(thunkable)

Push thunkable task to the thunk's queue, thunkable task will be eager evaluated, return the queueT;

queueT.end([thunkable])

End the thunk's queue. the thunk will be evaluated after all tasks finished in queue. return the queueT;

About

Thunk queue for uncertainty tasks evaluation.

Resources

Readme
MIT license
Activity
Custom properties

Stars

3 stars

Watchers

2 watching

Forks

0 forks
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.