@andrew_l/toolkit 0.2.14 → 0.2.16
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/index.cjs +1631 -1112
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +408 -3
- package/dist/index.d.mts +408 -3
- package/dist/index.d.ts +408 -3
- package/dist/index.mjs +1589 -1076
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -253,6 +253,7 @@ declare function shuffle<T>(arr: readonly T[]): T[];
|
|
|
253
253
|
* @template T The type of elements in the array
|
|
254
254
|
*/
|
|
255
255
|
type SortedArrayCompareFn<T> = (a: T, b: T) => number;
|
|
256
|
+
declare const SYM_COMPARE_FN: unique symbol;
|
|
256
257
|
/**
|
|
257
258
|
* A self-sorting array that maintains elements in a sorted order based on a comparison function.
|
|
258
259
|
* All mutating operations preserve the sorted order of elements.
|
|
@@ -280,7 +281,7 @@ type SortedArrayCompareFn<T> = (a: T, b: T) => number;
|
|
|
280
281
|
* @group Array
|
|
281
282
|
*/
|
|
282
283
|
declare class SortedArray<T> extends Array<T> {
|
|
283
|
-
|
|
284
|
+
private [SYM_COMPARE_FN];
|
|
284
285
|
/**
|
|
285
286
|
* Creates a new SortedArray instance.
|
|
286
287
|
*
|
|
@@ -478,6 +479,201 @@ declare namespace assert {
|
|
|
478
479
|
export { assert_array as array, assert_arrayNumbers as arrayNumbers, assert_arrayStrings as arrayStrings, assert_boolean as boolean, assert_date as date, assert_equal as equal, assert_fn as fn, assert_greaterThan as greaterThan, assert_lessThan as lessThan, assert_notEmpty as notEmpty, assert_notEmptyString as notEmptyString, assert_number as number, assert_object as object, assert_ok as ok, assert_string as string };
|
|
479
480
|
}
|
|
480
481
|
|
|
482
|
+
interface BaseX {
|
|
483
|
+
/**
|
|
484
|
+
* Base alphabet
|
|
485
|
+
*/
|
|
486
|
+
alphabet: string;
|
|
487
|
+
/**
|
|
488
|
+
* Base padding chars
|
|
489
|
+
*/
|
|
490
|
+
padding: string;
|
|
491
|
+
/**
|
|
492
|
+
* Encodes binary data into a BaseX string representation
|
|
493
|
+
*
|
|
494
|
+
* @param input - The binary data to encode
|
|
495
|
+
* @returns The encoded string
|
|
496
|
+
*/
|
|
497
|
+
encode(input: Uint8Array): string;
|
|
498
|
+
/**
|
|
499
|
+
* Decodes a baseX string back into binary data
|
|
500
|
+
*
|
|
501
|
+
* @param input - The encoded string to decode
|
|
502
|
+
* @returns The decoded binary data
|
|
503
|
+
* @throws {Error} When the input contains invalid characters or format
|
|
504
|
+
*/
|
|
505
|
+
decode(input: string): Uint8Array;
|
|
506
|
+
}
|
|
507
|
+
/**
|
|
508
|
+
* Create custom base alphabet encoding.
|
|
509
|
+
*
|
|
510
|
+
* @example
|
|
511
|
+
* ```typescript
|
|
512
|
+
* const base16 = basex('0123456789abcdef')
|
|
513
|
+
* const data = new Uint8Array([255, 255]);
|
|
514
|
+
* console.log(base16.encode(data));
|
|
515
|
+
* ```
|
|
516
|
+
*
|
|
517
|
+
* @example
|
|
518
|
+
* ```typescript
|
|
519
|
+
* const base16 = basex('0123456789abcdef')
|
|
520
|
+
* const encoded = "16FA";
|
|
521
|
+
* console.log(base16.decode(encoded));
|
|
522
|
+
* ```
|
|
523
|
+
*
|
|
524
|
+
* @group Binary
|
|
525
|
+
*/
|
|
526
|
+
declare function basex(alphabet: string): BaseX;
|
|
527
|
+
|
|
528
|
+
/**
|
|
529
|
+
* Base62 encoder/decoder for binary data.
|
|
530
|
+
*
|
|
531
|
+
* @example Basic usage
|
|
532
|
+
* ```typescript
|
|
533
|
+
* const data = new Uint8Array([255, 128, 64]);
|
|
534
|
+
* const encoded = base62.encode(data);
|
|
535
|
+
* console.log(encoded);
|
|
536
|
+
*
|
|
537
|
+
* const decoded = base62.decode(encoded);
|
|
538
|
+
* console.log(decoded); // Uint8Array [255, 128, 64]
|
|
539
|
+
* ```
|
|
540
|
+
*
|
|
541
|
+
* @example Text encoding
|
|
542
|
+
* ```typescript
|
|
543
|
+
* const text = "Hello World!";
|
|
544
|
+
* const bytes = new TextEncoder().encode(text);
|
|
545
|
+
* const encoded = base62.encode(bytes);
|
|
546
|
+
* const decoded = base62.decode(encoded);
|
|
547
|
+
* const result = new TextDecoder().decode(decoded);
|
|
548
|
+
* console.log(result); // "Hello World!"
|
|
549
|
+
* ```
|
|
550
|
+
*
|
|
551
|
+
* @group Binary
|
|
552
|
+
*/
|
|
553
|
+
declare const base62: BaseX;
|
|
554
|
+
|
|
555
|
+
/**
|
|
556
|
+
* Base62-like encoder/decoder for binary data but **super fast**. Useful for human readable tokens generation
|
|
557
|
+
*
|
|
558
|
+
* **Warning!** Not RFC standard
|
|
559
|
+
*
|
|
560
|
+
* @example Basic usage
|
|
561
|
+
* ```typescript
|
|
562
|
+
* const data = new Uint8Array([255, 128, 64]);
|
|
563
|
+
* const encoded = base62.encode(data);
|
|
564
|
+
* console.log(encoded);
|
|
565
|
+
*
|
|
566
|
+
* const decoded = base62.decode(encoded);
|
|
567
|
+
* console.log(decoded); // Uint8Array [255, 128, 64]
|
|
568
|
+
* ```
|
|
569
|
+
*
|
|
570
|
+
* @example Text encoding
|
|
571
|
+
* ```typescript
|
|
572
|
+
* const text = "Hello World!";
|
|
573
|
+
* const bytes = new TextEncoder().encode(text);
|
|
574
|
+
* const encoded = base62.encode(bytes);
|
|
575
|
+
* const decoded = base62.decode(encoded);
|
|
576
|
+
* const result = new TextDecoder().decode(decoded);
|
|
577
|
+
* console.log(result); // "Hello World!"
|
|
578
|
+
* ```
|
|
579
|
+
*
|
|
580
|
+
* @group Binary
|
|
581
|
+
*/
|
|
582
|
+
declare const base62Fast: BaseX;
|
|
583
|
+
|
|
584
|
+
declare class Base64Encoding implements BaseX {
|
|
585
|
+
alphabet: string;
|
|
586
|
+
padding: string;
|
|
587
|
+
private decodeMap;
|
|
588
|
+
constructor(alphabet: string, options?: {
|
|
589
|
+
padding?: string;
|
|
590
|
+
});
|
|
591
|
+
/**
|
|
592
|
+
* Encodes binary data into a base64 string representation
|
|
593
|
+
*
|
|
594
|
+
* @param input - The binary data to encode
|
|
595
|
+
* @returns The encoded string
|
|
596
|
+
*
|
|
597
|
+
* @example
|
|
598
|
+
* ```typescript
|
|
599
|
+
* const data = new Uint8Array([255, 255]);
|
|
600
|
+
* console.log(base64.encode(data));
|
|
601
|
+
* ```
|
|
602
|
+
*/
|
|
603
|
+
encode(data: Uint8Array, options?: {
|
|
604
|
+
includePadding?: boolean;
|
|
605
|
+
}): string;
|
|
606
|
+
/**
|
|
607
|
+
* Decodes a base64 string back into binary data
|
|
608
|
+
*
|
|
609
|
+
* @param input - The encoded string to decode
|
|
610
|
+
* @returns The decoded binary data
|
|
611
|
+
* @throws {Error} When the input contains invalid characters or format
|
|
612
|
+
*
|
|
613
|
+
* @example
|
|
614
|
+
* ```typescript
|
|
615
|
+
* const encoded = "AA==";
|
|
616
|
+
* console.log(base64.decode(encoded)); // Uint8Array [255, 255]
|
|
617
|
+
* ```
|
|
618
|
+
*/
|
|
619
|
+
decode(data: string, options?: {
|
|
620
|
+
strict?: boolean;
|
|
621
|
+
}): Uint8Array;
|
|
622
|
+
}
|
|
623
|
+
|
|
624
|
+
/**
|
|
625
|
+
* Base64 encoder/decoder for binary data
|
|
626
|
+
*
|
|
627
|
+
* @example Basic usage
|
|
628
|
+
* ```typescript
|
|
629
|
+
* const data = new Uint8Array([255, 128, 64]);
|
|
630
|
+
* const encoded = base64.encode(data);
|
|
631
|
+
* console.log(encoded);
|
|
632
|
+
*
|
|
633
|
+
* const decoded = base64.decode(encoded);
|
|
634
|
+
* console.log(decoded); // Uint8Array [255, 128, 64]
|
|
635
|
+
* ```
|
|
636
|
+
*
|
|
637
|
+
* @example Text encoding
|
|
638
|
+
* ```typescript
|
|
639
|
+
* const text = "Hello World!";
|
|
640
|
+
* const bytes = new TextEncoder().encode(text);
|
|
641
|
+
* const encoded = base64.encode(bytes);
|
|
642
|
+
* const decoded = base64.decode(encoded);
|
|
643
|
+
* const result = new TextDecoder().decode(decoded);
|
|
644
|
+
* console.log(result); // "Hello World!"
|
|
645
|
+
* ```
|
|
646
|
+
*
|
|
647
|
+
* @group Binary
|
|
648
|
+
*/
|
|
649
|
+
declare const base64: Base64Encoding;
|
|
650
|
+
/**
|
|
651
|
+
* Base64 encoder/decoder for binary data
|
|
652
|
+
*
|
|
653
|
+
* @example Basic usage
|
|
654
|
+
* ```typescript
|
|
655
|
+
* const data = new Uint8Array([255, 128, 64]);
|
|
656
|
+
* const encoded = base64url.encode(data);
|
|
657
|
+
* console.log(encoded);
|
|
658
|
+
*
|
|
659
|
+
* const decoded = base64url.decode(encoded);
|
|
660
|
+
* console.log(decoded); // Uint8Array [255, 128, 64]
|
|
661
|
+
* ```
|
|
662
|
+
*
|
|
663
|
+
* @example Text encoding
|
|
664
|
+
* ```typescript
|
|
665
|
+
* const text = "Hello World!";
|
|
666
|
+
* const bytes = new TextEncoder().encode(text);
|
|
667
|
+
* const encoded = base64url.encode(bytes);
|
|
668
|
+
* const decoded = base64url.decode(encoded);
|
|
669
|
+
* const result = new TextDecoder().decode(decoded);
|
|
670
|
+
* console.log(result); // "Hello World!"
|
|
671
|
+
* ```
|
|
672
|
+
*
|
|
673
|
+
* @group Binary
|
|
674
|
+
*/
|
|
675
|
+
declare const base64url: Base64Encoding;
|
|
676
|
+
|
|
481
677
|
type Base64ToBytesOptions = {
|
|
482
678
|
/**
|
|
483
679
|
* Encoding type
|
|
@@ -4660,7 +4856,216 @@ declare class SimpleEventEmitter<T extends SimpleEventMap<T> = SimpleDefaultEven
|
|
|
4660
4856
|
on<K>(eventName: Key<K, T>, listener: Listener1<K, T>): this;
|
|
4661
4857
|
once<K>(eventName: Key<K, T>, listener: Listener1<K, T>): this;
|
|
4662
4858
|
off<K>(eventName: Key<K, T>, listener: Listener1<K, T>): this;
|
|
4663
|
-
removeAllListeners(eventName?: Key<
|
|
4859
|
+
removeAllListeners<K>(eventName?: Key<K, T>): this;
|
|
4860
|
+
}
|
|
4861
|
+
|
|
4862
|
+
/**
|
|
4863
|
+
* Configuration options for creating a ResourcePool instance.
|
|
4864
|
+
* @template T The type of resource being pooled
|
|
4865
|
+
*/
|
|
4866
|
+
interface ResourcePoolOptions<T = unknown> {
|
|
4867
|
+
/** Maximum number of resources that can exist in the pool */
|
|
4868
|
+
poolSize: number;
|
|
4869
|
+
/**
|
|
4870
|
+
* Whether to automatically create resources when needed, up to poolSize limit.
|
|
4871
|
+
* If false, resources must be pre-created or acquired requests will queue.
|
|
4872
|
+
* @default false
|
|
4873
|
+
*/
|
|
4874
|
+
auto?: boolean;
|
|
4875
|
+
/** Factory function to create new resources */
|
|
4876
|
+
createResource: () => Awaitable<T>;
|
|
4877
|
+
/** Optional cleanup function called when destroying resources */
|
|
4878
|
+
destroyResource?: (resource: T) => Awaitable<void>;
|
|
4879
|
+
}
|
|
4880
|
+
type ResourcePoolEventMap = {
|
|
4881
|
+
error: [error: Error];
|
|
4882
|
+
};
|
|
4883
|
+
/**
|
|
4884
|
+
* A generic resource pool that manages the lifecycle of expensive resources.
|
|
4885
|
+
*
|
|
4886
|
+
* ResourcePool provides a way to:
|
|
4887
|
+
* - Limit the number of concurrent resources (e.g., database connections, file handles)
|
|
4888
|
+
* - Reuse resources to avoid creation/destruction overhead
|
|
4889
|
+
* - Queue requests when all resources are in use
|
|
4890
|
+
* - Automatically create resources on demand (when auto mode is enabled)
|
|
4891
|
+
* - Gracefully handle resource cleanup and pool destruction
|
|
4892
|
+
*
|
|
4893
|
+
* @template T The type of resource being pooled
|
|
4894
|
+
*
|
|
4895
|
+
* @example
|
|
4896
|
+
* ```typescript
|
|
4897
|
+
* // Database connection pool
|
|
4898
|
+
* const dbPool = new ResourcePool({
|
|
4899
|
+
* poolSize: 10,
|
|
4900
|
+
* auto: true,
|
|
4901
|
+
* createResource: () => createDatabaseConnection(),
|
|
4902
|
+
* destroyResource: (conn) => conn.close()
|
|
4903
|
+
* });
|
|
4904
|
+
*
|
|
4905
|
+
* // Acquire and use a connection
|
|
4906
|
+
* const conn = await dbPool.acquire();
|
|
4907
|
+
* try {
|
|
4908
|
+
* const result = await conn.query('SELECT * FROM users');
|
|
4909
|
+
* return result;
|
|
4910
|
+
* } finally {
|
|
4911
|
+
* dbPool.release(conn);
|
|
4912
|
+
* }
|
|
4913
|
+
* ```
|
|
4914
|
+
*
|
|
4915
|
+
* @group Promise
|
|
4916
|
+
*/
|
|
4917
|
+
declare class ResourcePool<T = unknown> extends SimpleEventEmitter<ResourcePoolEventMap> {
|
|
4918
|
+
private readonly poolSize;
|
|
4919
|
+
private readonly auto;
|
|
4920
|
+
private readonly createResource;
|
|
4921
|
+
private readonly destroyResource?;
|
|
4922
|
+
private readonly state;
|
|
4923
|
+
/**
|
|
4924
|
+
* Creates a new ResourcePool instance.
|
|
4925
|
+
*
|
|
4926
|
+
* @param options Configuration options for the pool
|
|
4927
|
+
*
|
|
4928
|
+
* @example
|
|
4929
|
+
* ```typescript
|
|
4930
|
+
* const pool = new ResourcePool({
|
|
4931
|
+
* poolSize: 5,
|
|
4932
|
+
* auto: true,
|
|
4933
|
+
* createResource: async () => new DatabaseConnection(),
|
|
4934
|
+
* destroyResource: async (conn) => conn.close()
|
|
4935
|
+
* });
|
|
4936
|
+
* ```
|
|
4937
|
+
*/
|
|
4938
|
+
constructor({ poolSize, auto, createResource, destroyResource, }: ResourcePoolOptions<T>);
|
|
4939
|
+
/**
|
|
4940
|
+
* Whether the pool is idle (no resources currently in use).
|
|
4941
|
+
* Useful for determining if it's safe to destroy the pool.
|
|
4942
|
+
*/
|
|
4943
|
+
get isIdle(): boolean;
|
|
4944
|
+
/** Number of resources currently available for acquisition */
|
|
4945
|
+
get availableCount(): number;
|
|
4946
|
+
/** Number of resources currently in use */
|
|
4947
|
+
get usedCount(): number;
|
|
4948
|
+
/** Maximum number of resources this pool can manage */
|
|
4949
|
+
get size(): number;
|
|
4950
|
+
/**
|
|
4951
|
+
* Acquires a resource from the pool.
|
|
4952
|
+
*
|
|
4953
|
+
* This method will:
|
|
4954
|
+
* 1. Return an available resource immediately if one exists
|
|
4955
|
+
* 2. Create a new resource if auto mode is enabled and under the pool limit
|
|
4956
|
+
* 3. Queue the request and wait if no resources are available
|
|
4957
|
+
*
|
|
4958
|
+
* @returns Promise that resolves to an acquired resource
|
|
4959
|
+
* @throws Error if the pool is destroyed while waiting (when rejectAcquires is true)
|
|
4960
|
+
*
|
|
4961
|
+
* @example
|
|
4962
|
+
* ```typescript
|
|
4963
|
+
* const resource = await pool.acquire();
|
|
4964
|
+
* try {
|
|
4965
|
+
* // Use the resource
|
|
4966
|
+
* await resource.doSomething();
|
|
4967
|
+
* } finally {
|
|
4968
|
+
* pool.release(resource); // Always release in finally block
|
|
4969
|
+
* }
|
|
4970
|
+
* ```
|
|
4971
|
+
*/
|
|
4972
|
+
acquire(): Promise<T>;
|
|
4973
|
+
/**
|
|
4974
|
+
* Returns a resource to the pool, making it available for reuse.
|
|
4975
|
+
*
|
|
4976
|
+
* The resource will be made available to the next queued acquisition request,
|
|
4977
|
+
* or returned to the available pool if no requests are pending.
|
|
4978
|
+
*
|
|
4979
|
+
* @param resource The resource to return to the pool
|
|
4980
|
+
*
|
|
4981
|
+
* @example
|
|
4982
|
+
* ```typescript
|
|
4983
|
+
* const resource = await pool.acquire();
|
|
4984
|
+
* try {
|
|
4985
|
+
* // Use resource...
|
|
4986
|
+
* } finally {
|
|
4987
|
+
* pool.release(resource); // Always release when done
|
|
4988
|
+
* }
|
|
4989
|
+
* ```
|
|
4990
|
+
*
|
|
4991
|
+
* @remarks
|
|
4992
|
+
* - Safe to call multiple times with the same resource (idempotent)
|
|
4993
|
+
* - Only resources that were acquired from this pool should be released
|
|
4994
|
+
* - Triggers drain completion if this was the last resource in use
|
|
4995
|
+
*/
|
|
4996
|
+
release(resource: T): void;
|
|
4997
|
+
/**
|
|
4998
|
+
* Manually add a resource to the pool.
|
|
4999
|
+
*
|
|
5000
|
+
* @param resource The resource to return to the pool
|
|
5001
|
+
*
|
|
5002
|
+
* @throws Error if resource already exists in the pool.
|
|
5003
|
+
* @throws Error if size reached.
|
|
5004
|
+
*/
|
|
5005
|
+
add(resource: T): void;
|
|
5006
|
+
/**
|
|
5007
|
+
* Waits for all currently acquired resources to be released.
|
|
5008
|
+
*
|
|
5009
|
+
* This is useful for graceful shutdown scenarios where you want to ensure
|
|
5010
|
+
* all work is completed before destroying the pool.
|
|
5011
|
+
*
|
|
5012
|
+
* @returns Promise that resolves when all resources are returned to the pool
|
|
5013
|
+
*
|
|
5014
|
+
* @example
|
|
5015
|
+
* ```typescript
|
|
5016
|
+
* // Graceful shutdown
|
|
5017
|
+
* console.log('Waiting for all connections to be released...');
|
|
5018
|
+
* await pool.drain();
|
|
5019
|
+
* console.log('All connections released, safe to destroy pool');
|
|
5020
|
+
* await pool.destroy();
|
|
5021
|
+
* ```
|
|
5022
|
+
*
|
|
5023
|
+
* @remarks
|
|
5024
|
+
* - Resolves immediately if no resources are currently in use
|
|
5025
|
+
* - Multiple drain calls can be made concurrently; they will all resolve together
|
|
5026
|
+
* - Does not prevent new acquisitions; use destroy() to prevent new usage
|
|
5027
|
+
*/
|
|
5028
|
+
drain(): Promise<void>;
|
|
5029
|
+
/**
|
|
5030
|
+
* Destroys the pool and all its resources.
|
|
5031
|
+
*
|
|
5032
|
+
* This method will:
|
|
5033
|
+
* 1. Wait for all resources to be released (drain)
|
|
5034
|
+
* 2. Optionally reject any pending acquisition requests
|
|
5035
|
+
* 3. Call destroyResource() on all available resources
|
|
5036
|
+
* 4. Clean up internal state
|
|
5037
|
+
*
|
|
5038
|
+
* @param rejectAcquires Whether to reject pending acquire() requests with an error
|
|
5039
|
+
* If false, pending requests will remain queued indefinitely
|
|
5040
|
+
* @returns Promise that resolves when destruction is complete
|
|
5041
|
+
*
|
|
5042
|
+
* @example
|
|
5043
|
+
* ```typescript
|
|
5044
|
+
* // Graceful shutdown - let pending requests complete
|
|
5045
|
+
* await pool.destroy(false);
|
|
5046
|
+
*
|
|
5047
|
+
* // Immediate shutdown - reject pending requests
|
|
5048
|
+
* await pool.destroy(true);
|
|
5049
|
+
* ```
|
|
5050
|
+
*
|
|
5051
|
+
* @remarks
|
|
5052
|
+
* - Safe to call multiple times; subsequent calls will wait for the first to complete
|
|
5053
|
+
* - The pool cannot be used after destruction
|
|
5054
|
+
* - Resources currently in use will not be force-destroyed; drain() is called first
|
|
5055
|
+
* - If destroyResource was not provided, resources are simply discarded
|
|
5056
|
+
*/
|
|
5057
|
+
destroy(rejectAcquires?: boolean): Promise<void>;
|
|
5058
|
+
private tryGetAvailableResource;
|
|
5059
|
+
private tryCreateAutoResource;
|
|
5060
|
+
private enqueueAcquireRequest;
|
|
5061
|
+
private moveResourceToAvailable;
|
|
5062
|
+
private processNextAcquireRequest;
|
|
5063
|
+
private checkForDrainCompletion;
|
|
5064
|
+
private enqueueDestroyRequest;
|
|
5065
|
+
private rejectPendingAcquires;
|
|
5066
|
+
private destroyAllResources;
|
|
5067
|
+
private resetState;
|
|
5068
|
+
private resolveDestroyQueue;
|
|
4664
5069
|
}
|
|
4665
5070
|
|
|
4666
5071
|
/**
|
|
@@ -5233,4 +5638,4 @@ declare function wrapText(value: string, maxLength?: number): string;
|
|
|
5233
5638
|
*/
|
|
5234
5639
|
declare function toError<T>(value: T, unknownMessage?: string): T extends Error ? T : Error;
|
|
5235
5640
|
|
|
5236
|
-
export { type AnyFunction, AppError, type AppErrorOptions, type ArgumentsType, type Arrayable, AsyncIterableQueue, type Awaitable, type Base64ToBytesOptions, BrowserAssertionError, type BytesToBase64Options, CancellablePromise, type CatchErrorResult, Color, type ColorChannels, ColorParser, type Data, type DateObject, type DateObjectInput, type DebouncedFunction, type DeepPartial, type DeepReadonly, type Defer, instance as EJSON, EJSON as EJSONInstance, EJSONStream, type EJSONStreamOptions, type EJSONStreamOptionsWithPayload, type EJSONType, type EnvParser, type ExecResult, type ExecResultToSkip, type ExecResultToSuccess, type ExecSkip, type ExecSuccess, FindMean, FixedMap, FixedWeakMap, type Fn, type FormatMoney, type FormatNumber, type FunctionArgs, type GenericObject, type IfAny, type IsAny, type LiteralUnion, type Logger, LruCache, type Nothing, type OverwriteWith, type Prettify, type Primitive, type PromisifyFn, Queue, type RandomizerOptions, type RetryOnErrorConfig, type SelectOptionItem, type SelectOptions, type SimpleDefaultEventMap, SimpleEventEmitter, type SimpleEventMap, SortedArray, type SortedArrayCompareFn, _default as TWEMOJI_REGEX, type ThemeConfig, type ThrottledFunction, TimeBucket, type TimeBucketOptions, type TimeObject, type TimeObjectInput, TimeSpan, type TimeSpanUnit, type TimeString, type TimeValue, type TimestampMsInput, type TypeOf, type TypeOfMap, type ValuesOfObject, type WithCache, type WithCacheBucketBatchOptions, type WithCacheBucketOptions, type WithCacheFixedOptions, type WithCacheLruOptions, type WithCacheOptions, type WithCachePointer, type WithCacheResult, type WithCacheStorage, type WithCustomizer, type WithCustomizerFactory, type WithCustomizerValue, type WrrItem, alpha, arrayable, assert, asyncFilter, asyncFind, asyncForEach, asyncMap, avg, avgCircular, base64ToBytes, bigIntBytes, bigIntFromBytes, blendColors, buildCssColor, bytesToBase64, cache, cacheBucket, cacheFixed, cacheLRU, camelCase, capitalize, captureStackTrace, catchError, channelsToHSL, channelsToHex, channelsToRGB, checkBitmask, chunk, chunkSeries, clamp, cleanEmpty, cleanObject, colorToChannels, compareBytes, concatenateBytes, contrastRatio, convertToUnit, crc32, createCustomizer, createCustomizerFactory, createDateObject, createDeepCloneWith, createEJSON, createEJSONStream, createEnvParser, createRandomizer, createSecureCustomizer, createTimeObject, createTimeSpan, createWithCache, cssVariable, dateInDays, dateInSeconds, debounce, deepAssign, deepClone, deepCloneWith, deepDefaults, deepFreeze, def, defer, delay, difference, dropCache, env, escapeHtml, escapeNumeric, escapeRegExp, fastIdle, fastIdlePromise, fastRaf, findMean, flagsToMap, flatten, formatMoney, formatNumber, get, getFileExtension, getFileName, getInitials, getMostSpecificPaths, getRandomInt, getRandomTime, getWords, groupBy, has, hasOwn, hasProtocol, hex, hexToChannels, hmToSeconds, hslToChannels, humanFileSize, humanize, interpolateColor, intersection, isBigInt, isBoolean, isCached, isClient, isColorChannels, isCustomizerFactory, isDate, isDateObject, isDef, isEmpty, isEqual, isError, isFunction, isInfinity, isMap, isNullOrUndefined, isNumber, isObject, isOneEmoji, isPlainObject, isPrimitive, isPromise, isRegExp, isSet, isSkip, isString, isSuccess, isSymbol, isTimeObject, isTimeString, isTimeValue, isValidWeekDay, isWeakMap, isWeakSet, isWithCache, isoToFlagEmoji, kebabCase, keyBy, logger, loggerSetLevel, lowerCase, luminance, maskingEmail, maskingPhone, maskingWords, nextTickIteration, noop, objectId, omit, omitPrefixed, orderBy, parseAllNumbers, parseAlpha, parsePercentage, percentOf, pick, pickPrefixed, qs, rafPromise, randomString, removeVS16s, retryOnError, rgbToChannels, round2digits, secondsToHm, set, shuffle, snakeCase, sprintf, startCase, strAssign, sum, throttle, timeFromMinutes, timeStringify, timeToMinutes, timeout, timestamp, timestampMs, timestampToDate, tintedTextColor, toError, toMap, truncate, typeOf, uint16ToUint8, uint32ToUint8, uint8ToUint16, uint8ToUint32, unflatten, union, uniq, uniqBy, unset, weeksInYear, weightedRoundRobin, withCache, withCacheBucket, withCacheBucketBatch, withCacheFixed, withCacheLRU, withDeepClone, withPointerCache, wrapText };
|
|
5641
|
+
export { type AnyFunction, AppError, type AppErrorOptions, type ArgumentsType, type Arrayable, AsyncIterableQueue, type Awaitable, type Base64ToBytesOptions, type BaseX, BrowserAssertionError, type BytesToBase64Options, CancellablePromise, type CatchErrorResult, Color, type ColorChannels, ColorParser, type Data, type DateObject, type DateObjectInput, type DebouncedFunction, type DeepPartial, type DeepReadonly, type Defer, instance as EJSON, EJSON as EJSONInstance, EJSONStream, type EJSONStreamOptions, type EJSONStreamOptionsWithPayload, type EJSONType, type EnvParser, type ExecResult, type ExecResultToSkip, type ExecResultToSuccess, type ExecSkip, type ExecSuccess, FindMean, FixedMap, FixedWeakMap, type Fn, type FormatMoney, type FormatNumber, type FunctionArgs, type GenericObject, type IfAny, type IsAny, type LiteralUnion, type Logger, LruCache, type Nothing, type OverwriteWith, type Prettify, type Primitive, type PromisifyFn, Queue, type RandomizerOptions, ResourcePool, type ResourcePoolEventMap, type ResourcePoolOptions, type RetryOnErrorConfig, type SelectOptionItem, type SelectOptions, type SimpleDefaultEventMap, SimpleEventEmitter, type SimpleEventMap, SortedArray, type SortedArrayCompareFn, _default as TWEMOJI_REGEX, type ThemeConfig, type ThrottledFunction, TimeBucket, type TimeBucketOptions, type TimeObject, type TimeObjectInput, TimeSpan, type TimeSpanUnit, type TimeString, type TimeValue, type TimestampMsInput, type TypeOf, type TypeOfMap, type ValuesOfObject, type WithCache, type WithCacheBucketBatchOptions, type WithCacheBucketOptions, type WithCacheFixedOptions, type WithCacheLruOptions, type WithCacheOptions, type WithCachePointer, type WithCacheResult, type WithCacheStorage, type WithCustomizer, type WithCustomizerFactory, type WithCustomizerValue, type WrrItem, alpha, arrayable, assert, asyncFilter, asyncFind, asyncForEach, asyncMap, avg, avgCircular, base62, base62Fast, base64, base64ToBytes, base64url, basex, bigIntBytes, bigIntFromBytes, blendColors, buildCssColor, bytesToBase64, cache, cacheBucket, cacheFixed, cacheLRU, camelCase, capitalize, captureStackTrace, catchError, channelsToHSL, channelsToHex, channelsToRGB, checkBitmask, chunk, chunkSeries, clamp, cleanEmpty, cleanObject, colorToChannels, compareBytes, concatenateBytes, contrastRatio, convertToUnit, crc32, createCustomizer, createCustomizerFactory, createDateObject, createDeepCloneWith, createEJSON, createEJSONStream, createEnvParser, createRandomizer, createSecureCustomizer, createTimeObject, createTimeSpan, createWithCache, cssVariable, dateInDays, dateInSeconds, debounce, deepAssign, deepClone, deepCloneWith, deepDefaults, deepFreeze, def, defer, delay, difference, dropCache, env, escapeHtml, escapeNumeric, escapeRegExp, fastIdle, fastIdlePromise, fastRaf, findMean, flagsToMap, flatten, formatMoney, formatNumber, get, getFileExtension, getFileName, getInitials, getMostSpecificPaths, getRandomInt, getRandomTime, getWords, groupBy, has, hasOwn, hasProtocol, hex, hexToChannels, hmToSeconds, hslToChannels, humanFileSize, humanize, interpolateColor, intersection, isBigInt, isBoolean, isCached, isClient, isColorChannels, isCustomizerFactory, isDate, isDateObject, isDef, isEmpty, isEqual, isError, isFunction, isInfinity, isMap, isNullOrUndefined, isNumber, isObject, isOneEmoji, isPlainObject, isPrimitive, isPromise, isRegExp, isSet, isSkip, isString, isSuccess, isSymbol, isTimeObject, isTimeString, isTimeValue, isValidWeekDay, isWeakMap, isWeakSet, isWithCache, isoToFlagEmoji, kebabCase, keyBy, logger, loggerSetLevel, lowerCase, luminance, maskingEmail, maskingPhone, maskingWords, nextTickIteration, noop, objectId, omit, omitPrefixed, orderBy, parseAllNumbers, parseAlpha, parsePercentage, percentOf, pick, pickPrefixed, qs, rafPromise, randomString, removeVS16s, retryOnError, rgbToChannels, round2digits, secondsToHm, set, shuffle, snakeCase, sprintf, startCase, strAssign, sum, throttle, timeFromMinutes, timeStringify, timeToMinutes, timeout, timestamp, timestampMs, timestampToDate, tintedTextColor, toError, toMap, truncate, typeOf, uint16ToUint8, uint32ToUint8, uint8ToUint16, uint8ToUint32, unflatten, union, uniq, uniqBy, unset, weeksInYear, weightedRoundRobin, withCache, withCacheBucket, withCacheBucketBatch, withCacheFixed, withCacheLRU, withDeepClone, withPointerCache, wrapText };
|