We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d276dc9 commit 3a06919Copy full SHA for 3a06919
source/create.ts
@@ -1,3 +1,4 @@
1
+import {setTimeout as delay} from 'node:timers/promises';
2
import is, {assert} from '@sindresorhus/is';
3
import asPromise from './as-promise/index.js';
4
import type {
@@ -17,11 +18,6 @@ import type {Response} from './core/response.js';
17
18
import Options, {type OptionsInit} from './core/options.js';
19
import type {CancelableRequest} from './as-promise/types.js';
20
-// The `delay` package weighs 10KB (!)
21
-const delay = async (ms: number) => new Promise(resolve => {
22
- setTimeout(resolve, ms);
23
-});
24
-
25
const isGotInstance = (value: Got | ExtendOptions): value is Got => is.function(value);
26
27
const aliases: readonly HTTPAlias[] = [
0 commit comments