6.1.0 • Published 2 years ago

@wezom/toolkit-promise v6.1.0

Weekly downloads
-
License
BSD-3-Clause
Repository
github
Last release
2 years ago

@wezom/toolkit-promise

Useful tools for working with Promises

StatementsBranchesFunctionsLines
StatementsBranchesFunctionsLines

Table of Content:

  1. Tools
    1. promiseSleep()
  2. Contributing
  3. License

Tools

promiseSleep()

comment: <> (AUTODOC-TOOL-START::sleep#default)

Sleep some milliseconds and resolve promise

Parameters:

NameData typeArgumentDefault valueDescription
msnumber

Returns: Promise<void>

Examples:

promiseSleep(500).then(() => tryAgainSomeMethod());
// or
async function fakeSubmit() {
	await promiseSleep(300);
	return true;
}

comment: <> (AUTODOC-TOOL-END)


▲ Go Top | ▲ Table of Content


Contributing

Please fill free to create issues or send PR

Licence

BSD-3-Clause License


6.1.0

2 years ago

6.0.1

2 years ago

5.3.0

3 years ago

5.2.0

3 years ago

4.0.0

3 years ago

5.0.0

3 years ago

3.0.1

3 years ago

3.0.0

3 years ago

2.0.0

3 years ago