Last change
on this file since 8d391a1 was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago |
initial commit
|
-
Property mode
set to
100644
|
File size:
493 bytes
|
Rev | Line | |
---|
[6a3a178] | 1 | "use strict";
|
---|
| 2 | Object.defineProperty(exports, "__esModule", { value: true });
|
---|
| 3 | /**
|
---|
| 4 | * `setTimeoutUnref` is just like `setTimeout`,
|
---|
| 5 | * only in Node's environment it will "unref" its macro task.
|
---|
| 6 | */
|
---|
| 7 | function setTimeoutUnref(callback, time, args) {
|
---|
| 8 | var ref = setTimeout.apply(typeof globalThis !== 'undefined' ? globalThis : global, arguments);
|
---|
| 9 | if (ref && typeof ref === 'object' && typeof ref.unref === 'function')
|
---|
| 10 | ref.unref();
|
---|
| 11 | return ref;
|
---|
| 12 | }
|
---|
| 13 | exports.default = setTimeoutUnref;
|
---|
Note:
See
TracBrowser
for help on using the repository browser.