@stacksjs/arrays 0.70.101 → 0.70.102

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.
Files changed (2) hide show
  1. package/dist/macro.d.ts +12 -12
  2. package/package.json +2 -2
package/dist/macro.d.ts CHANGED
@@ -6,27 +6,27 @@ export declare const Arr: {
6
6
  containsNone: (needles: string[], haystack: string[]) => boolean;
7
7
  containsOnly: (needles: string[], haystack: string[]) => boolean;
8
8
  doesNotContain: (needle: string, haystack: string[]) => boolean;
9
- toArray<T>: (array?: Nullable<Arrayable<T>>) => Array<T>;
10
- flatten<T>: (array?: Nullable<Arrayable<T | T[]>>) => T[];
11
- mergeArrayable<T>: (...args: Nullable<Arrayable<T>>[]) => Array<T>;
12
- partition<T>: (array: readonly T[], filter: PartitionFilter<T>) => [T[], T[]];
9
+ toArray: <T>(array?: Nullable<Arrayable<T>>) => Array<T>;
10
+ flatten: <T>(array?: Nullable<Arrayable<T | T[]>>) => T[];
11
+ mergeArrayable: <T>(...args: Nullable<Arrayable<T>>[]) => Array<T>;
12
+ partition: <T>(array: readonly T[], filter: PartitionFilter<T>) => [T[], T[]];
13
13
  /**
14
14
  * Returns a random item/s from the array
15
15
  */
16
- random<T>: (arr: T[], count?: number) => T[];
16
+ random: <T>(arr: T[], count?: number) => T[];
17
17
  /**
18
18
  * Returns random item/s from the array
19
19
  */
20
- sample<T>: (arr: T[], count?: number) => T[];
21
- unique<T>: (arr: T[]) => T[];
22
- uniqueBy<T>: (arr: readonly T[], equalFn: (a: any, b: any) => boolean) => T[];
23
- last<T>: (arr: T[]) => T | undefined;
24
- remove<T>: (arr: T[], value: T) => boolean;
20
+ sample: <T>(arr: T[], count?: number) => T[];
21
+ unique: <T>(arr: T[]) => T[];
22
+ uniqueBy: <T>(arr: readonly T[], equalFn: (a: any, b: any) => boolean) => T[];
23
+ last: <T>(arr: T[]) => T | undefined;
24
+ remove: <T>(arr: T[], value: T) => boolean;
25
25
  at: (arr: any[], index: number) => any;
26
26
  range: (arr: readonly number[]) => number;
27
- move<T>: (arr: T[], from: number, to: number) => T[];
27
+ move: <T>(arr: T[], from: number, to: number) => T[];
28
28
  clampArrayRange: (arr: readonly unknown[], n: number) => number;
29
- shuffle<T>: (arr: T[]) => T[];
29
+ shuffle: <T>(arr: T[]) => T[];
30
30
  /**
31
31
  * Returns the sum of all items in the array
32
32
  */
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@stacksjs/arrays",
3
3
  "type": "module",
4
- "version": "0.70.101",
4
+ "version": "0.70.102",
5
5
  "description": "The Stacks array utilities.",
6
6
  "author": "Chris Breuer",
7
7
  "contributors": [
@@ -55,7 +55,7 @@
55
55
  },
56
56
  "devDependencies": {
57
57
  "better-dx": "^0.2.16",
58
- "@stacksjs/utils": "0.70.101"
58
+ "@stacksjs/utils": "0.70.102"
59
59
  },
60
60
  "sideEffects": false
61
61
  }