@oscarpalmer/atoms 0.38.1 → 0.39.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/js/index.js CHANGED
@@ -363,6 +363,12 @@ function getPosition(event) {
363
363
  return typeof x === "number" && typeof y === "number" ? { x, y } : undefined;
364
364
  }
365
365
  // src/js/string.ts
366
+ function capitalise(value) {
367
+ if (value.length === 0) {
368
+ return value;
369
+ }
370
+ return value.length === 1 ? value.toLocaleUpperCase() : value.charAt(0).toLocaleUpperCase() + value.slice(1).toLocaleLowerCase();
371
+ }
366
372
  function createUuid() {
367
373
  return "10000000-1000-4000-8000-100000000000".replace(/[018]/g, (substring) => (substring ^ crypto.getRandomValues(new Uint8Array(1))[0] & 15 >> substring / 4).toString(16));
368
374
  }
@@ -377,11 +383,21 @@ function getString(value) {
377
383
  const asString = valueOff?.toString?.() ?? String(valueOff);
378
384
  return asString.startsWith("[object ") ? JSON.stringify(value) : asString;
379
385
  }
386
+ function titleCase(value) {
387
+ return value.split(/\s+/).map((word) => capitalise(word)).join(" ");
388
+ }
380
389
 
381
390
  // src/js/is.ts
382
391
  function isArrayOrPlainObject(value) {
383
392
  return Array.isArray(value) || isPlainObject(value);
384
393
  }
394
+ function isEmpty(value) {
395
+ if (Array.isArray(value)) {
396
+ return value.length === 0 || value.filter((item) => item != null).length === 0;
397
+ }
398
+ const values = Object.values(value);
399
+ return values.length === 0 || values.filter((item) => item != null).length === 0;
400
+ }
385
401
  function isNullable(value) {
386
402
  return value == null;
387
403
  }
@@ -468,6 +484,28 @@ if (globalThis._atomic_queued == null) {
468
484
  }
469
485
  });
470
486
  }
487
+ // src/js/random.ts
488
+ function getRandomBoolean() {
489
+ return Math.random() > 0.5;
490
+ }
491
+ function getRandomColour() {
492
+ return `#${Array.from({ length: 6 }, getRandomHex).join("")}`;
493
+ }
494
+ function getRandomDate(earliest, latest) {
495
+ const earliestTime = earliest?.getTime() ?? -8640000000000000;
496
+ const latestTime = latest?.getTime() ?? 8640000000000000;
497
+ return new Date(getRandomInteger(earliestTime, latestTime));
498
+ }
499
+ function getRandomFloat(min, max) {
500
+ const minimum = min ?? Number.MIN_SAFE_INTEGER;
501
+ return Math.random() * ((max ?? Number.MAX_SAFE_INTEGER) - minimum) + minimum;
502
+ }
503
+ function getRandomInteger(min, max) {
504
+ return Math.floor(getRandomFloat(min, max));
505
+ }
506
+ function getRandomHex() {
507
+ return "0123456789ABCDEF"[getRandomInteger(0, 16)];
508
+ }
471
509
  // src/js/timer.ts
472
510
  function isRepeated(value) {
473
511
  return /^repeat$/.test(value?.$timer ?? "");
@@ -583,8 +621,8 @@ var work = function(type, timer2, state, options) {
583
621
  const isRepeated2 = count > 0;
584
622
  let index = 0;
585
623
  let total = count * (interval > 0 ? interval : 1);
586
- if (total < milliseconds) {
587
- total = milliseconds;
624
+ if (total < 16.66667) {
625
+ total = 16.66667;
588
626
  }
589
627
  let current;
590
628
  let start;
@@ -626,19 +664,6 @@ var work = function(type, timer2, state, options) {
626
664
  state.frame = requestAnimationFrame(step);
627
665
  return timer2;
628
666
  };
629
- var milliseconds = 0;
630
- (() => {
631
- let start;
632
- function fn(time) {
633
- if (start == null) {
634
- start = time;
635
- requestAnimationFrame(fn);
636
- } else {
637
- milliseconds = time - start;
638
- }
639
- }
640
- requestAnimationFrame(fn);
641
- })();
642
667
  // src/js/touch.ts
643
668
  var supportsTouch = (() => {
644
669
  let value = false;
@@ -852,6 +877,7 @@ export {
852
877
  when,
853
878
  wait,
854
879
  unique,
880
+ titleCase,
855
881
  splice,
856
882
  setValue,
857
883
  repeat,
@@ -871,6 +897,7 @@ export {
871
897
  isNullableOrEmpty,
872
898
  isNullable,
873
899
  isFocusableElement,
900
+ isEmpty,
874
901
  isArrayOrPlainObject,
875
902
  insert,
876
903
  indexOf,
@@ -879,6 +906,13 @@ export {
879
906
  getTextDirection,
880
907
  getTabbableElements,
881
908
  getString,
909
+ getRandomInteger,
910
+ getRandomHex,
911
+ getRandomFloat,
912
+ getRandomDate,
913
+ getRandomColour,
914
+ getRandomColour as getRandomColor,
915
+ getRandomBoolean,
882
916
  getPosition,
883
917
  getNumber,
884
918
  getFocusableElements,
@@ -894,6 +928,8 @@ export {
894
928
  clone,
895
929
  clamp,
896
930
  chunk,
931
+ capitalise as capitalize,
932
+ capitalise,
897
933
  between,
898
934
  findElements as $$,
899
935
  findElement as $
package/dist/js/index.mjs CHANGED
@@ -7,6 +7,7 @@ export * from "./is";
7
7
  export * from "./models";
8
8
  export * from "./number";
9
9
  export * from "./queue";
10
+ export * from "./random";
10
11
  export * from "./string";
11
12
  export * from "./timer";
12
13
  export * from "./touch";
package/dist/js/is.js CHANGED
@@ -15,6 +15,13 @@ function getString(value) {
15
15
  function isArrayOrPlainObject(value) {
16
16
  return Array.isArray(value) || isPlainObject(value);
17
17
  }
18
+ function isEmpty(value) {
19
+ if (Array.isArray(value)) {
20
+ return value.length === 0 || value.filter((item) => item != null).length === 0;
21
+ }
22
+ const values = Object.values(value);
23
+ return values.length === 0 || values.filter((item) => item != null).length === 0;
24
+ }
18
25
  function isNullable(value) {
19
26
  return value == null;
20
27
  }
@@ -52,5 +59,6 @@ export {
52
59
  isNullableOrWhitespace,
53
60
  isNullableOrEmpty,
54
61
  isNullable,
62
+ isEmpty,
55
63
  isArrayOrPlainObject
56
64
  };
package/dist/js/is.mjs CHANGED
@@ -3,6 +3,13 @@ import {getString} from "./string";
3
3
  function isArrayOrPlainObject(value) {
4
4
  return Array.isArray(value) || isPlainObject(value);
5
5
  }
6
+ function isEmpty(value) {
7
+ if (Array.isArray(value)) {
8
+ return value.length === 0 || value.filter((item) => item != null).length === 0;
9
+ }
10
+ const values = Object.values(value);
11
+ return values.length === 0 || values.filter((item) => item != null).length === 0;
12
+ }
6
13
  function isNullable(value) {
7
14
  return value == null;
8
15
  }
@@ -40,5 +47,6 @@ export {
40
47
  isNullableOrWhitespace,
41
48
  isNullableOrEmpty,
42
49
  isNullable,
50
+ isEmpty,
43
51
  isArrayOrPlainObject
44
52
  };
@@ -0,0 +1,31 @@
1
+ // src/js/random.ts
2
+ function getRandomBoolean() {
3
+ return Math.random() > 0.5;
4
+ }
5
+ function getRandomColour() {
6
+ return `#${Array.from({ length: 6 }, getRandomHex).join("")}`;
7
+ }
8
+ function getRandomDate(earliest, latest) {
9
+ const earliestTime = earliest?.getTime() ?? -8640000000000000;
10
+ const latestTime = latest?.getTime() ?? 8640000000000000;
11
+ return new Date(getRandomInteger(earliestTime, latestTime));
12
+ }
13
+ function getRandomFloat(min, max) {
14
+ const minimum = min ?? Number.MIN_SAFE_INTEGER;
15
+ return Math.random() * ((max ?? Number.MAX_SAFE_INTEGER) - minimum) + minimum;
16
+ }
17
+ function getRandomInteger(min, max) {
18
+ return Math.floor(getRandomFloat(min, max));
19
+ }
20
+ function getRandomHex() {
21
+ return "0123456789ABCDEF"[getRandomInteger(0, 16)];
22
+ }
23
+ export {
24
+ getRandomInteger,
25
+ getRandomHex,
26
+ getRandomFloat,
27
+ getRandomDate,
28
+ getRandomColour,
29
+ getRandomColour as getRandomColor,
30
+ getRandomBoolean
31
+ };
@@ -0,0 +1,31 @@
1
+ // src/js/random.ts
2
+ function getRandomBoolean() {
3
+ return Math.random() > 0.5;
4
+ }
5
+ function getRandomColour() {
6
+ return `#${Array.from({ length: 6 }, getRandomHex).join("")}`;
7
+ }
8
+ function getRandomDate(earliest, latest) {
9
+ const earliestTime = earliest?.getTime() ?? -8640000000000000;
10
+ const latestTime = latest?.getTime() ?? 8640000000000000;
11
+ return new Date(getRandomInteger(earliestTime, latestTime));
12
+ }
13
+ function getRandomFloat(min, max) {
14
+ const minimum = min ?? Number.MIN_SAFE_INTEGER;
15
+ return Math.random() * ((max ?? Number.MAX_SAFE_INTEGER) - minimum) + minimum;
16
+ }
17
+ function getRandomInteger(min, max) {
18
+ return Math.floor(getRandomFloat(min, max));
19
+ }
20
+ function getRandomHex() {
21
+ return "0123456789ABCDEF"[getRandomInteger(0, 16)];
22
+ }
23
+ export {
24
+ getRandomInteger,
25
+ getRandomHex,
26
+ getRandomFloat,
27
+ getRandomDate,
28
+ getRandomColour,
29
+ getRandomColour as getRandomColor,
30
+ getRandomBoolean
31
+ };
package/dist/js/string.js CHANGED
@@ -1,4 +1,10 @@
1
1
  // src/js/string.ts
2
+ function capitalise(value) {
3
+ if (value.length === 0) {
4
+ return value;
5
+ }
6
+ return value.length === 1 ? value.toLocaleUpperCase() : value.charAt(0).toLocaleUpperCase() + value.slice(1).toLocaleLowerCase();
7
+ }
2
8
  function createUuid() {
3
9
  return "10000000-1000-4000-8000-100000000000".replace(/[018]/g, (substring) => (substring ^ crypto.getRandomValues(new Uint8Array(1))[0] & 15 >> substring / 4).toString(16));
4
10
  }
@@ -13,7 +19,13 @@ function getString(value) {
13
19
  const asString = valueOff?.toString?.() ?? String(valueOff);
14
20
  return asString.startsWith("[object ") ? JSON.stringify(value) : asString;
15
21
  }
22
+ function titleCase(value) {
23
+ return value.split(/\s+/).map((word) => capitalise(word)).join(" ");
24
+ }
16
25
  export {
26
+ titleCase,
17
27
  getString,
18
- createUuid
28
+ createUuid,
29
+ capitalise as capitalize,
30
+ capitalise
19
31
  };
@@ -1,4 +1,10 @@
1
1
  // src/js/string.ts
2
+ function capitalise(value) {
3
+ if (value.length === 0) {
4
+ return value;
5
+ }
6
+ return value.length === 1 ? value.toLocaleUpperCase() : value.charAt(0).toLocaleUpperCase() + value.slice(1).toLocaleLowerCase();
7
+ }
2
8
  function createUuid() {
3
9
  return "10000000-1000-4000-8000-100000000000".replace(/[018]/g, (substring) => (substring ^ crypto.getRandomValues(new Uint8Array(1))[0] & 15 >> substring / 4).toString(16));
4
10
  }
@@ -13,7 +19,13 @@ function getString(value) {
13
19
  const asString = valueOff?.toString?.() ?? String(valueOff);
14
20
  return asString.startsWith("[object ") ? JSON.stringify(value) : asString;
15
21
  }
22
+ function titleCase(value) {
23
+ return value.split(/\s+/).map((word) => capitalise(word)).join(" ");
24
+ }
16
25
  export {
26
+ titleCase,
17
27
  getString,
18
- createUuid
28
+ createUuid,
29
+ capitalise as capitalize,
30
+ capitalise
19
31
  };
package/dist/js/timer.js CHANGED
@@ -113,8 +113,8 @@ var work = function(type, timer2, state, options) {
113
113
  const isRepeated2 = count > 0;
114
114
  let index = 0;
115
115
  let total = count * (interval > 0 ? interval : 1);
116
- if (total < milliseconds) {
117
- total = milliseconds;
116
+ if (total < 16.66667) {
117
+ total = 16.66667;
118
118
  }
119
119
  let current;
120
120
  let start;
@@ -156,19 +156,6 @@ var work = function(type, timer2, state, options) {
156
156
  state.frame = requestAnimationFrame(step);
157
157
  return timer2;
158
158
  };
159
- var milliseconds = 0;
160
- (() => {
161
- let start;
162
- function fn(time) {
163
- if (start == null) {
164
- start = time;
165
- requestAnimationFrame(fn);
166
- } else {
167
- milliseconds = time - start;
168
- }
169
- }
170
- requestAnimationFrame(fn);
171
- })();
172
159
  export {
173
160
  when,
174
161
  wait,
package/dist/js/timer.mjs CHANGED
@@ -113,8 +113,8 @@ var work = function(type, timer2, state, options) {
113
113
  const isRepeated2 = count > 0;
114
114
  let index = 0;
115
115
  let total = count * (interval > 0 ? interval : 1);
116
- if (total < milliseconds) {
117
- total = milliseconds;
116
+ if (total < 16.66667) {
117
+ total = 16.66667;
118
118
  }
119
119
  let current;
120
120
  let start;
@@ -156,19 +156,6 @@ var work = function(type, timer2, state, options) {
156
156
  state.frame = requestAnimationFrame(step);
157
157
  return timer2;
158
158
  };
159
- var milliseconds = 0;
160
- (() => {
161
- let start;
162
- function fn(time) {
163
- if (start == null) {
164
- start = time;
165
- requestAnimationFrame(fn);
166
- } else {
167
- milliseconds = time - start;
168
- }
169
- }
170
- requestAnimationFrame(fn);
171
- })();
172
159
  export {
173
160
  when,
174
161
  wait,
package/package.json CHANGED
@@ -8,10 +8,10 @@
8
8
  },
9
9
  "description": "Sweet little atomic goodies…",
10
10
  "devDependencies": {
11
- "@biomejs/biome": "^1.6",
12
- "@happy-dom/global-registrator": "^14.7",
11
+ "@biomejs/biome": "^1.7",
12
+ "@happy-dom/global-registrator": "^14.11",
13
13
  "bun": "^1.1",
14
- "sass": "^1.74",
14
+ "sass": "^1.77",
15
15
  "typescript": "^5.4"
16
16
  },
17
17
  "exports": {
@@ -105,7 +105,11 @@
105
105
  },
106
106
  "./package.json": "./package.json"
107
107
  },
108
- "files": ["dist", "src", "types"],
108
+ "files": [
109
+ "dist",
110
+ "src",
111
+ "types"
112
+ ],
109
113
  "keywords": [],
110
114
  "license": "MIT",
111
115
  "main": "./dist/js/index.js",
@@ -126,5 +130,5 @@
126
130
  },
127
131
  "type": "module",
128
132
  "types": "./types/index.d.ts",
129
- "version": "0.38.1"
133
+ "version": "0.39.0"
130
134
  }
package/src/js/index.ts CHANGED
@@ -6,6 +6,7 @@ export * from './is';
6
6
  export * from './models';
7
7
  export * from './number';
8
8
  export * from './queue';
9
+ export * from './random';
9
10
  export * from './string';
10
11
  export * from './timer';
11
12
  export * from './touch';
package/src/js/is.ts CHANGED
@@ -10,6 +10,20 @@ export function isArrayOrPlainObject(
10
10
  return Array.isArray(value) || isPlainObject(value);
11
11
  }
12
12
 
13
+ export function isEmpty(value: ArrayOrPlainObject): boolean {
14
+ if (Array.isArray(value)) {
15
+ return (
16
+ value.length === 0 || value.filter(item => item != null).length === 0
17
+ );
18
+ }
19
+
20
+ const values = Object.values(value);
21
+
22
+ return (
23
+ values.length === 0 || values.filter(item => item != null).length === 0
24
+ );
25
+ }
26
+
13
27
  /**
14
28
  * Is the value undefined or null?
15
29
  */
@@ -0,0 +1,48 @@
1
+ /**
2
+ * Returns a random boolean
3
+ */
4
+ export function getRandomBoolean(): boolean {
5
+ return Math.random() > 0.5;
6
+ }
7
+
8
+ /**
9
+ * Returns a random hexadecimal colour
10
+ */
11
+ export function getRandomColour(): string {
12
+ return `#${Array.from({length: 6}, getRandomHex).join('')}`;
13
+ }
14
+
15
+ /**
16
+ * Returns a random date
17
+ */
18
+ export function getRandomDate(earliest?: Date, latest?: Date): Date {
19
+ const earliestTime = earliest?.getTime() ?? -8_640_000_000_000_000;
20
+ const latestTime = latest?.getTime() ?? 8_640_000_000_000_000;
21
+
22
+ return new Date(getRandomInteger(earliestTime, latestTime));
23
+ }
24
+
25
+ /**
26
+ * Returns a random floating-point number
27
+ */
28
+ export function getRandomFloat(min?: number, max?: number): number {
29
+ const minimum = min ?? Number.MIN_SAFE_INTEGER;
30
+
31
+ return Math.random() * ((max ?? Number.MAX_SAFE_INTEGER) - minimum) + minimum;
32
+ }
33
+
34
+ /**
35
+ * Returns a random integer
36
+ */
37
+ export function getRandomInteger(min?: number, max?: number): number {
38
+ return Math.floor(getRandomFloat(min, max));
39
+ }
40
+
41
+ /**
42
+ * Returns a random hexadecimal character
43
+ */
44
+ export function getRandomHex(): string {
45
+ return '0123456789ABCDEF'[getRandomInteger(0, 16)];
46
+ }
47
+
48
+ export {getRandomColour as getRandomColor};
package/src/js/string.ts CHANGED
@@ -1,13 +1,26 @@
1
+ /**
2
+ * Capitalise the first letter of a string _(and lowercase the rest)_
3
+ */
4
+ export function capitalise(value: string): string {
5
+ if (value.length === 0) {
6
+ return value;
7
+ }
8
+ return value.length === 1
9
+ ? value.toLocaleUpperCase()
10
+ : value.charAt(0).toLocaleUpperCase() + value.slice(1).toLocaleLowerCase();
11
+ }
12
+
1
13
  /**
2
14
  * Create a new UUID
3
15
  */
4
16
  export function createUuid(): string {
5
17
  return '10000000-1000-4000-8000-100000000000'.replace(
6
18
  /[018]/g,
7
- (substring: any) =>
19
+ (substring: string) =>
8
20
  (
9
- substring ^
10
- (crypto.getRandomValues(new Uint8Array(1))[0] & (15 >> (substring / 4)))
21
+ (substring as never) ^
22
+ (crypto.getRandomValues(new Uint8Array(1))[0] &
23
+ (15 >> ((substring as never) / 4)))
11
24
  ).toString(16),
12
25
  );
13
26
  }
@@ -29,3 +42,15 @@ export function getString(value: unknown): string {
29
42
 
30
43
  return asString.startsWith('[object ') ? JSON.stringify(value) : asString;
31
44
  }
45
+
46
+ /**
47
+ * Convert a string to title case _(capitalising every word)_
48
+ */
49
+ export function titleCase(value: string): string {
50
+ return value
51
+ .split(/\s+/)
52
+ .map(word => capitalise(word))
53
+ .join(' ');
54
+ }
55
+
56
+ export {capitalise as capitalize};
package/src/js/timer.ts CHANGED
@@ -94,8 +94,6 @@ type WhenOptions = {} & OptionsWithCount;
94
94
 
95
95
  type WorkType = 'restart' | 'start' | 'stop';
96
96
 
97
- let milliseconds = 0;
98
-
99
97
  /**
100
98
  * Is the value a repeating timer?
101
99
  */
@@ -202,13 +200,13 @@ export function wait(callback: () => void): Timer;
202
200
 
203
201
  /**
204
202
  * Creates a timer which calls a callback after a certain amount of time
205
- * - `time` defaults to `0`
206
203
  */
207
204
  export function wait(callback: () => void, time: number): Timer;
208
205
 
209
206
  /**
210
207
  * Creates a timer which calls a callback after a certain amount of time
211
208
  * - `options.interval` defaults to `0`
209
+ * - `options.timeout` defaults to `30_000` _(30 seconds)_
212
210
  */
213
211
  export function wait(
214
212
  callback: () => void,
@@ -316,8 +314,8 @@ function work(
316
314
  let index = 0;
317
315
  let total = count * (interval > 0 ? interval : 1);
318
316
 
319
- if (total < milliseconds) {
320
- total = milliseconds;
317
+ if (total < 16.66667) {
318
+ total = 16.66667;
321
319
  }
322
320
 
323
321
  let current: DOMHighResTimeStamp | null;
@@ -374,22 +372,3 @@ function work(
374
372
 
375
373
  return timer;
376
374
  }
377
-
378
- /**
379
- * Called immediately to calculate an approximate refresh rate in milliseconds
380
- */
381
- (() => {
382
- let start: number;
383
-
384
- function fn(time: number) {
385
- if (start == null) {
386
- start = time;
387
-
388
- requestAnimationFrame(fn);
389
- } else {
390
- milliseconds = time - start;
391
- }
392
- }
393
-
394
- requestAnimationFrame(fn);
395
- })();
package/types/index.d.ts CHANGED
@@ -6,6 +6,7 @@ export * from './is';
6
6
  export * from './models';
7
7
  export * from './number';
8
8
  export * from './queue';
9
+ export * from './random';
9
10
  export * from './string';
10
11
  export * from './timer';
11
12
  export * from './touch';
package/types/is.d.ts CHANGED
@@ -3,6 +3,7 @@ import type { ArrayOrPlainObject, PlainObject, Primitive } from './models';
3
3
  * Is the value an array or a record?
4
4
  */
5
5
  export declare function isArrayOrPlainObject(value: unknown): value is ArrayOrPlainObject;
6
+ export declare function isEmpty(value: ArrayOrPlainObject): boolean;
6
7
  /**
7
8
  * Is the value undefined or null?
8
9
  */
@@ -0,0 +1,25 @@
1
+ /**
2
+ * Returns a random boolean
3
+ */
4
+ export declare function getRandomBoolean(): boolean;
5
+ /**
6
+ * Returns a random hexadecimal colour
7
+ */
8
+ export declare function getRandomColour(): string;
9
+ /**
10
+ * Returns a random date
11
+ */
12
+ export declare function getRandomDate(earliest?: Date, latest?: Date): Date;
13
+ /**
14
+ * Returns a random floating-point number
15
+ */
16
+ export declare function getRandomFloat(min?: number, max?: number): number;
17
+ /**
18
+ * Returns a random integer
19
+ */
20
+ export declare function getRandomInteger(min?: number, max?: number): number;
21
+ /**
22
+ * Returns a random hexadecimal character
23
+ */
24
+ export declare function getRandomHex(): string;
25
+ export { getRandomColour as getRandomColor };
package/types/string.d.ts CHANGED
@@ -1,3 +1,7 @@
1
+ /**
2
+ * Capitalise the first letter of a string _(and lowercase the rest)_
3
+ */
4
+ export declare function capitalise(value: string): string;
1
5
  /**
2
6
  * Create a new UUID
3
7
  */
@@ -6,3 +10,8 @@ export declare function createUuid(): string;
6
10
  * Get the string value from any value
7
11
  */
8
12
  export declare function getString(value: unknown): string;
13
+ /**
14
+ * Convert a string to title case _(capitalising every word)_
15
+ */
16
+ export declare function titleCase(value: string): string;
17
+ export { capitalise as capitalize };
package/types/timer.d.ts CHANGED
@@ -93,12 +93,12 @@ export declare function repeat(callback: IndexedCallback, options?: Partial<Repe
93
93
  export declare function wait(callback: () => void): Timer;
94
94
  /**
95
95
  * Creates a timer which calls a callback after a certain amount of time
96
- * - `time` defaults to `0`
97
96
  */
98
97
  export declare function wait(callback: () => void, time: number): Timer;
99
98
  /**
100
99
  * Creates a timer which calls a callback after a certain amount of time
101
100
  * - `options.interval` defaults to `0`
101
+ * - `options.timeout` defaults to `30_000` _(30 seconds)_
102
102
  */
103
103
  export declare function wait(callback: () => void, options: Partial<WaitOptions>): Timer;
104
104
  /**