@h3ravel/support 0.13.0 → 0.14.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/index.d.cts CHANGED
@@ -39,69 +39,37 @@ type TGeneric<V = any, K extends string = string> = Record<K, V>;
39
39
  type XGeneric<V = TGeneric, T = any> = {
40
40
  [key: string]: T;
41
41
  } & V;
42
- declare namespace Arr_d_exports {
43
- export { alternate, chunk, collapse, combine, find, first, flatten, forget, isEmpty, isNotEmpty, last, pop, prepend, range, reverse, shift, take, wrap };
44
- }
45
- /**
46
- * Splits an array into chunks of a specified size.
47
- *
48
- * @template T - Type of elements in the array
49
- * @param arr - The input array
50
- * @param size - Size of each chunk (default: 2)
51
- * @returns An array of chunks (arrays)
52
- */
53
- declare const chunk: <T>(arr: T[], size?: number) => T[][];
54
- /**
55
- * Collapse an array of arrays into a single array.
56
- */
57
- declare const collapse: <T>(arr: (T | T[])[]) => T[];
58
- /**
59
- * Alternates between two arrays, creating a zipped result.
60
- */
61
- declare const alternate: <T>(a: T[], b: T[]) => T[];
62
- /**
63
- * Combine arrays and sum their values element by element.
64
- */
65
- declare const combine: (...arr: number[][]) => number[];
66
- /** Find the value associated with a given key. */
67
- declare const find: <T>(key: T, arr: T[]) => T | null;
68
- /** Returns a new array without the given indices. */
69
- declare const forget: <T>(arr: T[], keys: number[]) => T[];
70
- /** Remove the first element and return tuple [el, rest]. */
71
- declare const first: <T>(arr: T[]) => [T, T[]];
72
- /** Remove the last element and return tuple [el, rest]. */
73
- declare const last: <T>(arr: T[]) => [T, T[]];
74
- /** Check if array is empty. */
75
- declare const isEmpty: <T>(arr: T[]) => boolean;
76
- /** Check if array is empty. */
77
- declare const isNotEmpty: <T>(arr: T[]) => boolean;
78
- /** Pop the element off the end of array. */
79
- declare const pop: <T>(arr: T[]) => T[];
80
- /** Add elements to the beginning of array. */
81
- declare const prepend: <T>(arr: T[], ...elements: T[]) => T[];
82
- /** Take first n elements of array. */
83
- declare const take: <T>(amount: number, arr: T[]) => T[];
84
- /** Create a new array in reverse order. */
85
- declare const reverse: <T>(arr: T[]) => T[];
86
- /** Alias for first element removal. */
87
- declare const shift: <T>(arr: T[]) => [T, T[]];
42
+ type DotPath<T> = T extends object ? { [K in keyof T & (string | number)]: T[K] extends object ? `${K}` | `${K}.${DotPath<T[K]>}` : `${K}` }[keyof T & (string | number)] : never;
43
+ //#endregion
44
+ //#region src/Contracts/TypeCast.d.ts
45
+ type Arrayable = {
46
+ [key: string]: any;
47
+ toArray(): any[];
48
+ };
49
+ type Jsonable = {
50
+ [key: string]: any;
51
+ toJSON(): any;
52
+ };
53
+ type JsonSerializable = {
54
+ [key: string]: any;
55
+ jsonSerialize(): any;
56
+ };
57
+ //#endregion
58
+ //#region src/Exceptions/InvalidArgumentException.d.ts
88
59
  /**
89
- * Generates an array of sequential numbers.
90
- *
91
- * @param size - Number of elements in the range
92
- * @param startAt - Starting number (default: 0)
93
- * @returns An array of numbers from startAt to startAt + size - 1
60
+ * Custom error for invalid type coercion
94
61
  */
95
- declare const range: (size: number, startAt?: number) => number[];
96
- /** Flatten multi-dimensional arrays into single level. */
97
- declare const flatten: <T>(arr: T[]) => T[];
62
+ declare class InvalidArgumentException extends Error {
63
+ constructor(message: string);
64
+ }
65
+ //#endregion
66
+ //#region src/Exceptions/RuntimeException.d.ts
98
67
  /**
99
- * If the given value is not an array and not null, wrap it in one.
100
- *
101
- * @param {Array} value
102
- * @return array
68
+ * Custom error for invalid type coercion
103
69
  */
104
- declare const wrap: <A>(value: A | A[]) => A[];
70
+ declare class RuntimeException extends Error {
71
+ constructor(message: string);
72
+ }
105
73
  declare namespace Crypto_d_exports {
106
74
  export { base64Decode, base64Encode, caesarCipher, checksum, hash, hmac, random, randomColor, randomPassword, randomSecure, secureToken, uuid, verifyChecksum, xor };
107
75
  }
@@ -272,7 +240,7 @@ declare const toBytes: (bytes?: number, decimals?: number, bits?: boolean) => st
272
240
  */
273
241
  declare const toHumanTime: (seconds?: number, worded?: boolean) => string;
274
242
  declare namespace Obj_d_exports {
275
- export { dot, extractProperties, getValue, modObj, safeDot, setNested, slugifyKeys };
243
+ export { Obj, data_fill, data_forget, data_get, data_set, dot, extractProperties, getValue, modObj, safeDot, setNested, slugifyKeys, toCssClasses, toCssStyles, undot };
276
244
  }
277
245
  /**
278
246
  * Flattens a nested object into a single-level object
@@ -352,6 +320,489 @@ declare const setNested: (obj: Record<string, any>, key: string, value: any) =>
352
320
  * @returns A new object with slugified keys
353
321
  */
354
322
  declare const slugifyKeys: <T extends object>(obj: T, only?: string[], separator?: string) => KeysToSnakeCase<T>;
323
+ /**
324
+ * toCssClasses
325
+ *
326
+ * Convert array/object/string input into a CSS class string.
327
+ * - Arrays: included if truthy
328
+ * - Objects: keys included if value is truthy
329
+ * - Strings: included as-is
330
+ */
331
+ declare function toCssClasses<T extends string | Record<string, boolean> | Array<string | false | null | undefined>>(input: T): string;
332
+ /**
333
+ * toCssStyles
334
+ *
335
+ * Convert object input into CSS style string.
336
+ * - Only includes truthy values (ignores null/undefined/false)
337
+ */
338
+ declare function toCssStyles<T extends Record<string, string | number | boolean | null | undefined>>(styles: T): string;
339
+ /**
340
+ * undot
341
+ *
342
+ * Convert a dot-notated object back into nested structure.
343
+ *
344
+ * Example:
345
+ * undot({ 'a.b': 1, 'c.0': 2 }) -> { a: { b: 1 }, c: [2] }
346
+ */
347
+ declare function undot(obj: Record<string, any>): Record<string, any>;
348
+ /**
349
+ * data_get
350
+ *
351
+ * Get a value from an object using dot notation.
352
+ */
353
+ declare function data_get<T extends object, P extends DotPath<T> | DotPath<T>[], D = undefined>(obj: T, path: P, defaultValue?: D): T | any;
354
+ /**
355
+ * data_set
356
+ *
357
+ * Set a value in an object using dot notation. Mutates the object.
358
+ */
359
+ declare function data_set<T extends Record<string, any>, P extends string | string[], V>(obj: T, path: P, value: V): asserts obj is T & Record<P extends string ? P : P[0], V>;
360
+ /**
361
+ * data_fill
362
+ *
363
+ * Like data_set, but only sets the value if the key does NOT exist.
364
+ */
365
+ declare function data_fill(obj: Record<string, any>, path: string | string[], value: any): void;
366
+ /**
367
+ * data_forget
368
+ *
369
+ * Remove a key from an object using dot notation.
370
+ */
371
+ declare function data_forget(obj: Record<string, any>, path: string | string[]): void;
372
+ declare class Obj {
373
+ /**
374
+ * Check if the value is a non-null object (associative/accessible).
375
+ */
376
+ static accessible(value: unknown): value is Record<string, any>;
377
+ /**
378
+ * Add a key-value pair to an object only if the key does not already exist.
379
+ *
380
+ * Returns a new object (does not mutate original).
381
+ */
382
+ static add<T extends Record<string, any>, K extends string, V>(obj: T, key: K, value: V): T & Record<K, V>;
383
+ /**
384
+ * Split object into [keys, values]
385
+ */
386
+ static divide<T extends Record<string, any>>(obj: T): [string[], any[]];
387
+ /**
388
+ * Check if a key exists in the object.
389
+ */
390
+ static exists<T extends Record<string, any>>(obj: T, key: string | number): boolean;
391
+ /**
392
+ * Get a value from an object using dot notation.
393
+ *
394
+ * Example:
395
+ * Obj.get({a:{b:1}}, 'a.b') -> 1
396
+ */
397
+ static get<T extends object, P extends DotPath<T>, D = undefined>(obj: T, path: P, defaultValue?: D): any;
398
+ /**
399
+ * Check if the object has a given key or keys (dot notation supported).
400
+ */
401
+ static has<T extends object, P extends DotPath<T>>(obj: T, keys: P | P[]): boolean;
402
+ /**
403
+ * Check if an object is associative (has at least one non-numeric key).
404
+ */
405
+ static isAssoc(obj: unknown): obj is Record<string, any>;
406
+ /**
407
+ * Add a prefix to all keys of the object.
408
+ */
409
+ static prependKeysWith<T extends Record<string, any>>(obj: T, prefix: string): Record<string, any>;
410
+ /**
411
+ * Convert an object into a URL query string.
412
+ *
413
+ * Nested objects/arrays are flattened using bracket notation.
414
+ */
415
+ static query(obj: Record<string, any>): string;
416
+ }
417
+ //#endregion
418
+ //#region src/Helpers/Arr.d.ts
419
+ /**
420
+ * Arr — Laravel-like array helpers for JavaScript.
421
+ *
422
+ * - Methods aim for clear, predictable JS behavior.
423
+ * - Inputs are validated where useful; functions try not to mutate arguments.
424
+ */
425
+ declare class Arr {
426
+ /**
427
+ * Helper: is a value an object (but not null).
428
+ */
429
+ static _isObject(value: any): boolean;
430
+ /**
431
+ * Helper: deep clone for safety (simple).
432
+ * Uses JSON methods — good for typical data shapes (no functions, Dates, Maps).
433
+ */
434
+ static _clone<A = any>(value: A): A;
435
+ /**
436
+ * Retrieve a value using dot notation
437
+ * Throws if value is not an array
438
+ */
439
+ static array(obj: any, path: string, defaultValue?: number): any[];
440
+ /**
441
+ * Retrieve a value using dot notation
442
+ * Throws if value is not a boolean
443
+ */
444
+ static boolean(obj: any, path: string, defaultValue?: boolean): boolean;
445
+ /**
446
+ * Flatten an array of arrays by one level.
447
+ *
448
+ * Example:
449
+ * Arr.collapse([[1,2], [3], 4]) -> [1,2,3,4]
450
+ */
451
+ static collapse<X>(array: X[][] | X[]): X[];
452
+ /**
453
+ * Cartesian product of arrays.
454
+ *
455
+ * Example:
456
+ * Arr.crossJoin([1,2], ['a','b']) -> [[1,'a'], [1,'b'], [2,'a'], [2,'b']]
457
+ *
458
+ * Accepts any number of array arguments (or single array-of-arrays).
459
+ */
460
+ static crossJoin<A>(...arrays: A[][]): A[][];
461
+ /**
462
+ * Split an array (or object) into two arrays: [keys, values].
463
+ *
464
+ * For arrays, keys are numeric indices. For objects, keys are property names.
465
+ *
466
+ * Example:
467
+ * Arr.divide(['a','b']) -> [[0,1], ['a','b']]
468
+ * Arr.divide({x:1,y:2}) -> [['x','y'], [1,2]]
469
+ */
470
+ static divide<A>(input: A[] | Record<string, A>): (A[] | number[])[] | (A[] | string[])[];
471
+ /**
472
+ * Flatten a nested array/object structure into a single-level object
473
+ * with dot-notated keys.
474
+ *
475
+ * Example:
476
+ * Arr.dot({ a: { b: 1 }, c: [2,3] }) -> { 'a.b': 1, 'c.0': 2, 'c.1': 3 }
477
+ *
478
+ * Works for arrays and plain objects.
479
+ */
480
+ static dot<A>(input: A[] | Record<string, A>, prefix?: string): Record<string, A>;
481
+ /**
482
+ * Checks if all elements satisfy the predicate
483
+ */
484
+ static every<T>(array: T[], predicate: (item: T) => boolean): boolean;
485
+ /**
486
+ * Remove items by keys/indices from an array or properties from an object.
487
+ *
488
+ * For arrays: keys are numeric indices (single number or array of numbers).
489
+ *
490
+ * Returns a shallow-copied result (does not mutate input).
491
+ *
492
+ * Example:
493
+ * Arr.except([10,20,30], [1]) -> [10,30]
494
+ */
495
+ static except<A extends any[] | Record<string, any>, X>(input: A, keys: X[]): A;
496
+ /**
497
+ * Return the first element of an array that satisfies the predicate,
498
+ * or the first element if no predicate is provided, otherwise the defaultValue.
499
+ *
500
+ * Predicate can be true (boolean), a function or a value to match (strict equality).
501
+ *
502
+ * When predicate is true (boolean), the first element will be removed and a tuple will be returned [el, rest].
503
+ *
504
+ * @param array
505
+ * @param predicate
506
+ * @param defaultValue
507
+ *
508
+ * @returns
509
+ */
510
+ static first<A, P extends (((arg: A) => true) | true)>(array: A[], predicate?: P | undefined, defaultValue?: A | undefined): P extends true ? [A, A[]] : A | undefined;
511
+ /**
512
+ * Recursively flatten an array up to `depth` levels (default: Infinity).
513
+ *
514
+ * Example:
515
+ * Arr.flatten([1, [2, [3]]], 1) -> [1,2,[3]]
516
+ */
517
+ static flatten<A>(array: A[], depth?: number): A[];
518
+ /**
519
+ * Retrieve a value from an array/object using dot notation
520
+ * Throws if value is not a float
521
+ */
522
+ static float(obj: any, path: string, defaultValue?: number): number;
523
+ /**
524
+ * Remove element(s) by index or dot-notated path from an array/object.
525
+ *
526
+ * For arrays: accepts numeric index or array of indices. Returns a new array.
527
+ *
528
+ * For objects: supports dot notation to remove nested keys.
529
+ *
530
+ * Example:
531
+ * Arr.forget([1,2,3], 1) -> [1,3]
532
+ * Arr.forget({a:{b:1}}, 'a.b') -> { a: {} }
533
+ */
534
+ static forget<A extends any[] | Record<string, any>>(input: A, keys: any): A;
535
+ /**
536
+ * Converts various input types into a plain array
537
+ * Supports Arrays, Objects, Iterables, Map, WeakMap, and custom toArray/toJSON/jsonSerialize methods
538
+ */
539
+ static from<T>(value: T | Iterable<T> | Arrayable | Jsonable | JsonSerializable | null | undefined): any[];
540
+ /**
541
+ * Checks if an object has all the specified keys
542
+ */
543
+ static hasAll<T extends object>(obj: T, keys: (keyof T)[]): boolean;
544
+ /**
545
+ * For arrays: check if the array contains any of the provided values.
546
+ *
547
+ * values can be single value or array of values.
548
+ *
549
+ * Example:
550
+ * Arr.hasAny([1,2,3], [4,2]) -> true
551
+ */
552
+ static hasAny<A>(array: A[], values: A[] | A): boolean;
553
+ /**
554
+ * Retrieve a value using dot notation
555
+ * Throws if value is not an integer
556
+ */
557
+ static integer(obj: any, path: string, defaultValue?: number): number;
558
+ /**
559
+ * Determine if the input is a "list-like" array: an Array with
560
+ * contiguous numeric indices starting at 0 (no gaps).
561
+ *
562
+ * Example:
563
+ * Arr.isList([1,2,3]) -> true
564
+ * const a = []; a[2] = 5; Arr.isList(a) -> false
565
+ */
566
+ static isList<A>(value: A[]): boolean;
567
+ /**
568
+ * Join array elements into a string using the given separator.
569
+ *
570
+ * Example:
571
+ * Arr.join([1,2,3], '-') -> '1-2-3'
572
+ */
573
+ static join(array: any[], separator?: string): string;
574
+ /**
575
+ * Create an object indexed by a key or callback function.
576
+ *
577
+ * Example:
578
+ * Arr.keyBy([{id:1},{id:2}], 'id') -> { '1': {id:1}, '2': {id:2} }
579
+ */
580
+ static keyBy<T>(array: T[], key: keyof T | ((item: T) => string | number)): Record<string, T>;
581
+ /**
582
+ * Get the last element of an array, optionally matching a predicate,
583
+ * or the last element if no predicate is provided, otherwise the defaultValue.
584
+ *
585
+ * Predicate can be a true (boolean), a function or a value to match (strict equality).
586
+ *
587
+ * When predicate is true (boolean), the last element will be removed and a tuple will be returned [el, rest].
588
+ *
589
+ * @param array
590
+ * @param predicate
591
+ * @param defaultValue
592
+ *
593
+ * @returns
594
+ */
595
+ static last<T, P extends ((item: T) => boolean) | true>(array: T[], predicate?: P | T, defaultValue?: T): P extends true ? [T, T[]] : T | undefined;
596
+ /**
597
+ * Transform each element in an array using a callback.
598
+ */
599
+ static map<T, U>(array: T[], callback: (item: T, index: number) => U): U[];
600
+ /**
601
+ * Maps a multi-dimensional array with a spread callback
602
+ */
603
+ static mapSpread<T extends any[], U>(array: T[], callback: (...items: T) => U): U[];
604
+ /**
605
+ * Map each element to a key-value pair.
606
+ *
607
+ * Example:
608
+ * Arr.mapWithKeys([{id:1, name:'A'}], x => [x.id, x.name])
609
+ * -> { '1': 'A' }
610
+ */
611
+ static mapWithKeys<T, K extends string | number, V>(array: T[], callback: (item: T, index: number) => [K, V]): Record<string, V>;
612
+ /**
613
+ * Return only elements at the given indices.
614
+ *
615
+ * Example:
616
+ * Arr.only([10,20,30], [0,2]) -> [10,30]
617
+ */
618
+ static only<T>(array: T[], keys: number | number[]): T[];
619
+ /**
620
+ * Split an array into two arrays based on a predicate
621
+ */
622
+ static partition<T>(array: T[], predicate: (item: T) => boolean): [T[], T[]];
623
+ /**
624
+ * Extract a property from each element in an array of objects.
625
+ *
626
+ * Example:
627
+ * Arr.pluck([{name:'A'},{name:'B'}], 'name') -> ['A','B']
628
+ */
629
+ static pluck<T, K extends keyof T>(array: T[], key: K): T[K][];
630
+ /**
631
+ * Add elements to the beginning of an array and return a new array.
632
+ *
633
+ * @param array
634
+ * @param value
635
+ * @returns
636
+ */
637
+ static prepend<T>(array: T[], ...value: T[]): T[];
638
+ /**
639
+ * Remove a value from an array by index and return it.
640
+ * Returns a tuple: [newArray, removedValue]
641
+ */
642
+ static pull<T>(array: T[], key: number): [T[], T | undefined];
643
+ /**
644
+ * Append values to an array (mutable)
645
+ */
646
+ static push<T>(array: T[], ...values: T[]): T[];
647
+ /**
648
+ * Pick one or more random elements from an array.
649
+ */
650
+ static random<T>(array: T[], count?: number): T | T[] | undefined;
651
+ /**
652
+ * Returns array elements that do NOT satisfy the predicate
653
+ */
654
+ static reject<T>(array: T[], predicate: (item: T) => boolean): T[];
655
+ /**
656
+ * Pick keys from an array of objects or an object
657
+ */
658
+ static select<T extends object, K extends keyof T>(obj: T, keys: K[]): Pick<T, K>;
659
+ /**
660
+ * Returns the only element that passes a callback, throws if none or multiple
661
+ */
662
+ static sole<T>(array: T[], predicate: (item: T) => boolean): T;
663
+ /**
664
+ * Checks if at least one element satisfies the predicate
665
+ */
666
+ static some<T>(array: T[], predicate: (item: T) => boolean): boolean;
667
+ /**
668
+ * Randomly shuffle an array and return a new array.
669
+ */
670
+ static shuffle<T>(array: T[]): T[];
671
+ /**
672
+ * Sort an array ascending using optional comparator.
673
+ */
674
+ static sort<T>(array: T[], comparator?: (a: T, b: T) => number): T[];
675
+ /**
676
+ * Sort an array descending using optional comparator.
677
+ */
678
+ static sortDesc<T>(array: T[], comparator?: (a: T, b: T) => number): T[];
679
+ /**
680
+ * Recursively sort arrays inside an array.
681
+ */
682
+ static sortRecursive<T>(array: T[]): T[];
683
+ /**
684
+ * Recursively sort arrays inside an array descending.
685
+ */
686
+ static sortRecursiveDesc<T>(array: T[]): T[];
687
+ /**
688
+ * Retrieve a value using dot notation
689
+ * Throws if value is not a string
690
+ */
691
+ static string(obj: any, path: string, defaultValue?: string): string;
692
+ /**
693
+ * Return the first N elements of an array.
694
+ *
695
+ * @param array
696
+ * @param count
697
+ * @returns
698
+ */
699
+ static take<T>(array: T[], count: number): T[];
700
+ /**
701
+ * Filter an array based on a predicate function or key-value match.
702
+ */
703
+ static where<T>(array: T[], predicate: ((item: T) => boolean) | Partial<T>): T[];
704
+ /**
705
+ * Filter an array of objects, keeping elements where the given key is not null/undefined.
706
+ */
707
+ static whereNotNull<T>(array: T[], key: keyof T): T[];
708
+ /**
709
+ * If the given value is not an array and not null, wrap it in one.
710
+ *
711
+ * Non-array values become [value]; null/undefined becomes [].
712
+ *
713
+ * @param value
714
+ * @returns
715
+ */
716
+ static wrap<T>(value: T | T[] | null | undefined): T[];
717
+ /**
718
+ * Return the first element of an array, undefined if empty.
719
+ */
720
+ static head<T>(array: T[]): T | undefined;
721
+ /**
722
+ * Splits an array into chunks of a specified size.
723
+ *
724
+ * @template T - Type of elements in the array
725
+ * @param arr - The input array
726
+ * @param size - Size of each chunk (default: 2)
727
+ * @returns An array of chunks (arrays)
728
+ */
729
+ static chunk: <T>(arr: T[], size?: number) => T[][];
730
+ /**
731
+ * Alternates between two arrays, creating a zipped result.
732
+ *
733
+ * @param a
734
+ * @param b
735
+ * @returns
736
+ */
737
+ static alternate<T>(a: T[], b: T[]): T[];
738
+ /**
739
+ * Combine arrays and sum their values element by element.
740
+ *
741
+ * @param arr
742
+ * @returns
743
+ */
744
+ static combine(...arr: number[][]): number[];
745
+ /**
746
+ * Find the value associated with a given key.
747
+ *
748
+ * @param key
749
+ * @param arr
750
+ * @returns
751
+ */
752
+ static find<T>(key: T, arr: T[]): T | null;
753
+ /**
754
+ * Check if array is empty.
755
+ *
756
+ * @param arr
757
+ * @returns
758
+ */
759
+ static isEmpty<T>(arr: T[]): boolean;
760
+ /**
761
+ * Check if array is empty.
762
+ *
763
+ * @param arr
764
+ * @returns
765
+ */
766
+ static isNotEmpty<T>(arr: T[]): boolean;
767
+ /**
768
+ * Pop the element off the end of array.
769
+ *
770
+ * @param arr
771
+ * @returns
772
+ */
773
+ static pop<T>(arr: T[]): T[];
774
+ /**
775
+ * Create a new array in reverse order.
776
+ *
777
+ * @param arr
778
+ * @returns
779
+ */
780
+ static reverse<T>(arr: T[]): T[];
781
+ /**
782
+ * Return the first element of an array that satisfies the predicate,
783
+ * or the first element if no predicate is provided, otherwise the defaultValue.
784
+ *
785
+ * Predicate can be true (boolean), a function or a value to match (strict equality).
786
+ *
787
+ * When predicate is true (boolean), the first element will be removed and a tuple will be returned [el, rest].
788
+ *
789
+ * @param array
790
+ * @param predicate
791
+ * @param defaultValue
792
+ *
793
+ * @alias Arr.first()
794
+ * @returns
795
+ */
796
+ static shift<A, P extends (((arg: A) => true) | true)>(array: A[], predicate?: P | undefined, defaultValue?: A | undefined): P extends true ? [A, A[]] : A | undefined;
797
+ /**
798
+ * Generates an array of sequential numbers.
799
+ *
800
+ * @param size - Number of elements in the range
801
+ * @param startAt - Starting number (default: 0)
802
+ * @returns An array of numbers from startAt to startAt + size - 1
803
+ */
804
+ static range(size: number, startAt?: number): number[];
805
+ }
355
806
  //#endregion
356
807
  //#region src/Helpers/Time.d.ts
357
808
  declare function format(date: ConfigType, fmt: string): string;
@@ -2697,17 +3148,17 @@ declare function str(string?: string): Stringable;
2697
3148
  //#endregion
2698
3149
  //#region src/GlobalBootstrap.d.ts
2699
3150
  type CollapseStatics<T extends Record<string, any>> = { [K in keyof T]: T[K] };
2700
- type Omitables = 'start' | 'take' | 'reverse' | 'chunk' | 'find' | 'pop' | 'end' | 'shift' | 'push' | 'at' | 'prototype' | 'concat' | 'join' | 'slice' | 'sort' | 'splice' | 'includes' | 'indexOf' | 'lastIndexOf' | 'findIndex' | 'every' | 'some' | 'forEach' | 'map' | 'filter' | 'reduce' | 'unshift' | 'flat' | 'flatMap' | 'keys' | 'fill' | 'copyWithin' | 'entries' | 'values' | 'reduceRight' | 'length' | 'of' | typeof Symbol.unscopables | typeof Symbol.iterator;
3151
+ type Omitables = 'start' | 'take' | 'reverse' | 'chunk' | 'find' | 'pop' | 'end' | 'shift' | 'push' | 'at' | 'prototype' | 'concat' | 'join' | 'slice' | 'sort' | 'splice' | 'includes' | 'indexOf' | 'lastIndexOf' | 'findIndex' | 'every' | 'some' | 'forEach' | 'map' | 'filter' | 'reduce' | 'unshift' | 'flat' | 'flatMap' | 'keys' | 'fill' | 'copyWithin' | 'entries' | 'values' | 'reduceRight' | 'length' | 'of' | '_isObject' | '_clone' | 'crossJoin' | 'divide' | 'wrap' | 'except' | 'hasAny' | 'isList' | 'keyBy' | 'mapWithKeys' | 'only' | 'pluck' | 'pull' | 'shuffle' | 'sortDesc' | 'sortRecursive' | 'sortRecursiveDesc' | 'where' | 'whereNotNull' | 'head' | 'string' | 'boolean' | 'array' | 'float' | 'from' | 'hasAll' | 'integer' | 'mapSpread' | 'partition' | 'reject' | 'select' | 'sole' | 'alternate' | 'combine' | 'isEmpty' | 'isNotEmpty' | 'range' | typeof Symbol.unscopables | typeof Symbol.iterator;
2701
3152
  type TakeTime = Pick<typeof DateTime, 'now' | 'format' | 'fromTimestamp' | 'randomTime' | 'firstDayOfMonth' | 'lastDayOfMonth' | 'parse'>;
2702
3153
  type TakeString = Pick<typeof Str, 'after' | 'afterLast' | 'apa' | 'ascii' | 'before' | 'beforeLast' | 'between' | 'betweenFirst' | 'capitalize' | 'plural' | 'singular' | 'title'>;
2703
3154
  /**
2704
3155
  * Global helpers interface that mirrors Laravel's helpers
2705
3156
  * and provides convenient access to all utility functions
2706
3157
  */
2707
- interface GlobalHelpers extends Omit<CollapseStatics<typeof Arr_d_exports>, Omitables>, Omit<CollapseStatics<TakeString>, Omitables | 'random' | 'uuid'>, Omit<CollapseStatics<TakeTime>, Omitables>, Omit<CollapseStatics<typeof Obj_d_exports>, Omitables>, Omit<CollapseStatics<typeof Crypto_d_exports>, Omitables>, Omit<CollapseStatics<typeof Number_d_exports>, Omitables>, Omit<CollapseStatics<typeof DumpDie_d_exports>, Omitables> {
2708
- Arr: typeof Arr_d_exports;
3158
+ interface GlobalHelpers extends Omit<CollapseStatics<typeof Arr>, Omitables | 'random' | 'dot'>, Omit<CollapseStatics<TakeString>, Omitables | 'random' | 'uuid'>, Omit<CollapseStatics<TakeTime>, Omitables>, Omit<CollapseStatics<typeof Obj_d_exports>, Omitables | 'Obj'>, Omit<CollapseStatics<typeof Crypto_d_exports>, Omitables>, Omit<CollapseStatics<typeof Number_d_exports>, Omitables>, Omit<CollapseStatics<typeof DumpDie_d_exports>, Omitables> {
3159
+ Arr: typeof Arr;
2709
3160
  Str: typeof Str;
2710
- Obj: typeof Obj_d_exports;
3161
+ Obj: typeof Obj;
2711
3162
  Crypto: typeof Crypto_d_exports;
2712
3163
  Number: typeof Number_d_exports;
2713
3164
  DumpDie: typeof DumpDie_d_exports;
@@ -2744,5 +3195,5 @@ declare function loadHelpers(target?: any): void;
2744
3195
  */
2745
3196
  declare function cleanHelpers(target?: any): void;
2746
3197
  //#endregion
2747
- export { Arr_d_exports as Arr, Callback, CamelToSnakeCase, Crypto_d_exports as Crypto, DateTime, DumpDie_d_exports as DumpDie, ExcerptOptions, Fallback, Function, GlobalHelpers, HtmlString, HtmlStringType, KeysToSnakeCase, Mode, Number_d_exports as Number, Obj_d_exports as Obj, SnakeToCamelCase, SnakeToTitleCase, Str, Stringable, TGeneric, Value, XGeneric, abbreviate, alternate, base64Decode, base64Encode, caesarCipher, checksum, chunk, cleanHelpers, collapse, combine, dd, dot, dump, extractProperties, find, first, flatten, forget, format, getValue, hash, hmac, humanize, isEmpty, isNotEmpty, last, loadHelpers, modObj, pop, prepend, random, randomColor, randomPassword, randomSecure, range, reverse, safeDot, secureToken, setNested, shift, slugifyKeys, str, take, toBytes, toHumanTime, uuid, verifyChecksum, wrap, xor };
3198
+ export { Arr, Arrayable, Callback, CamelToSnakeCase, Crypto_d_exports as Crypto, DateTime, DotPath, DumpDie_d_exports as DumpDie, ExcerptOptions, Fallback, Function, GlobalHelpers, HtmlString, HtmlStringType, InvalidArgumentException, JsonSerializable, Jsonable, KeysToSnakeCase, Mode, Number_d_exports as Number, Obj_d_exports as Obj, RuntimeException, SnakeToCamelCase, SnakeToTitleCase, Str, Stringable, TGeneric, Value, XGeneric, abbreviate, base64Decode, base64Encode, caesarCipher, checksum, cleanHelpers, data_fill, data_forget, data_get, data_set, dd, dot, dump, extractProperties, format, getValue, hash, hmac, humanize, loadHelpers, modObj, random, randomColor, randomPassword, randomSecure, safeDot, secureToken, setNested, slugifyKeys, str, toBytes, toCssClasses, toCssStyles, toHumanTime, undot, uuid, verifyChecksum, xor };
2748
3199
  //# sourceMappingURL=index.d.cts.map