Skip to content

Latest commit

 

History

10 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 

Repository files navigation

Definitely

Definitely

Call promise infinitely useful for Infinite Loading.

Definitely(new Promise(function(resolve, reject) {
  reject("Hello!");
}), 500, function() {}, function(logs) {
  console.log(logs);
});

Installation

<script src="https://cdn.jsdelivr.net/gh/dlvdls18/Definitely@main/src/definitely.js"></script>

Documentation

Arguments

Call the function Definitely with these order of arguments:

NOTE: Every arguments are required.

Definitely(promise, times, onsuccess, onerror, delay);
  • Promise Class<Promise> - Promise to call.
  • Times Number - Error limit when the promise rejected.
  • Onsuccess Function - When the promise resolved, this will called with the resolve arguments.
  • Onerror Function - When the expected loop is done, this will called with argument Error Array which has every error logs.
  • Delay Number - Loop delay

When the promise resolved, the loop will end.

About

Call promise infinitely useful for Infinite Loading

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages