|
Last change
on this file since a762898 was a762898, checked in by istevanoska <ilinastevanoska@…>, 5 months ago |
|
Added visualizations
|
-
Property mode
set to
100644
|
|
File size:
264 bytes
|
| Line | |
|---|
| 1 | import { toNumber } from '../util/toNumber.mjs';
|
|---|
| 2 |
|
|---|
| 3 | function delay(func, wait, ...args) {
|
|---|
| 4 | if (typeof func !== 'function') {
|
|---|
| 5 | throw new TypeError('Expected a function');
|
|---|
| 6 | }
|
|---|
| 7 | return setTimeout(func, toNumber(wait) || 0, ...args);
|
|---|
| 8 | }
|
|---|
| 9 |
|
|---|
| 10 | export { delay };
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.