0.0.4 • Published 3 years ago

public_request_task v0.0.4

Weekly downloads
-
License
ISC
Repository
github
Last release
3 years ago

A common run function task

how to use

start

yarn add public_request_task

npm install public_request_task

example

  const req = require('public_request_task');

  function Task() {
    return new Promise(resolve => {
      setTimeout(() => {
        resolve(true);
        console.log(true);
      }, 1000)
    })
  }

  req(Task, true);
  req(Task, true);
  
  req(Task);
  req(Task);
  req(Task);

options

  • task: function your business function
  • isSync: boolean control your function is async if true, other task will run after sync function finished
0.0.4

3 years ago

0.0.3

3 years ago

0.0.2

3 years ago

0.0.1

3 years ago

1.0.0

3 years ago