@thi.ng/arrays 2.8.2 → 2.8.4
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/CHANGELOG.md +1 -1
- package/README.md +1 -12
- package/arg-sort.d.ts +2 -0
- package/argmin.d.ts +2 -0
- package/binary-search.d.ts +6 -0
- package/blit.d.ts +2 -0
- package/fill-range.d.ts +2 -0
- package/floyd-rivest.d.ts +2 -0
- package/is-sorted.d.ts +2 -0
- package/levenshtein.d.ts +2 -0
- package/package.json +8 -8
- package/quicksort.d.ts +2 -0
- package/sort-cached.d.ts +2 -0
- package/swap.d.ts +2 -0
- package/swizzle.d.ts +2 -0
- package/threshold.d.ts +2 -0
- package/topo-sort.d.ts +2 -0
package/CHANGELOG.md
CHANGED
package/README.md
CHANGED
|
@@ -1,16 +1,5 @@
|
|
|
1
1
|
<!-- This file is generated - DO NOT EDIT! -->
|
|
2
2
|
<!-- Please see: https://github.com/thi-ng/umbrella/blob/develop/CONTRIBUTING.md#changes-to-readme-files -->
|
|
3
|
-
> [!IMPORTANT]
|
|
4
|
-
> ‼️ Announcing the thi.ng user survey 2024 📋
|
|
5
|
-
>
|
|
6
|
-
> [Please participate in the survey here!](https://forms.gle/XacbSDEmQMPZg8197)\
|
|
7
|
-
> (open until end of February)
|
|
8
|
-
>
|
|
9
|
-
> **To achieve a better sample size, I'd highly appreciate if you could
|
|
10
|
-
> circulate the link to this survey in your own networks.**
|
|
11
|
-
>
|
|
12
|
-
> [Discussion](https://github.com/thi-ng/umbrella/discussions/447)
|
|
13
|
-
|
|
14
3
|
# 
|
|
15
4
|
|
|
16
5
|
[](https://www.npmjs.com/package/@thi.ng/arrays)
|
|
@@ -22,7 +11,7 @@
|
|
|
22
11
|
> of the [@thi.ng/umbrella](https://github.com/thi-ng/umbrella/) monorepo
|
|
23
12
|
> and anti-framework.
|
|
24
13
|
>
|
|
25
|
-
> 🚀
|
|
14
|
+
> 🚀 Please help me to work full-time on these projects by [sponsoring me on
|
|
26
15
|
> GitHub](https://github.com/sponsors/postspectacular). Thank you! ❤️
|
|
27
16
|
|
|
28
17
|
- [About](#about)
|
package/arg-sort.d.ts
CHANGED
package/argmin.d.ts
CHANGED
package/binary-search.d.ts
CHANGED
|
@@ -17,6 +17,8 @@ import type { Comparator, Fn, FnN, FnN2 } from "@thi.ng/api";
|
|
|
17
17
|
*
|
|
18
18
|
* @example
|
|
19
19
|
* ```ts
|
|
20
|
+
* import { binarySearch } from "@thi.ng/arrays";
|
|
21
|
+
*
|
|
20
22
|
* binarySearch([2, 4, 6], 5);
|
|
21
23
|
* // -3
|
|
22
24
|
* ```
|
|
@@ -81,6 +83,8 @@ export declare const binarySearch32: (buf: ArrayLike<number>, x: number) => numb
|
|
|
81
83
|
*
|
|
82
84
|
* @example
|
|
83
85
|
* ```ts
|
|
86
|
+
* import { binarySearch, bsLT } from "@thi.ng/arrays";
|
|
87
|
+
*
|
|
84
88
|
* bsLT(binarySearch([10, 20, 30, 40], 25))
|
|
85
89
|
* // 1
|
|
86
90
|
* ```
|
|
@@ -101,6 +105,8 @@ export declare const bsLE: FnN;
|
|
|
101
105
|
*
|
|
102
106
|
* @example
|
|
103
107
|
* ```ts
|
|
108
|
+
* import { binarySearch, bsGT } from "@thi.ng/arrays";
|
|
109
|
+
*
|
|
104
110
|
* src = [10, 20, 30, 40];
|
|
105
111
|
*
|
|
106
112
|
* bsGT(binarySearch(src, 25), src.length)
|
package/blit.d.ts
CHANGED
package/fill-range.d.ts
CHANGED
package/floyd-rivest.d.ts
CHANGED
package/is-sorted.d.ts
CHANGED
package/levenshtein.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@thi.ng/arrays",
|
|
3
|
-
"version": "2.8.
|
|
3
|
+
"version": "2.8.4",
|
|
4
4
|
"description": "Array / Arraylike utilities",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"module": "./index.js",
|
|
@@ -35,12 +35,12 @@
|
|
|
35
35
|
"test": "bun test"
|
|
36
36
|
},
|
|
37
37
|
"dependencies": {
|
|
38
|
-
"@thi.ng/api": "^8.9.
|
|
39
|
-
"@thi.ng/checks": "^3.5.
|
|
40
|
-
"@thi.ng/compare": "^2.2.
|
|
41
|
-
"@thi.ng/equiv": "^2.1.
|
|
42
|
-
"@thi.ng/errors": "^2.4.
|
|
43
|
-
"@thi.ng/random": "^3.6.
|
|
38
|
+
"@thi.ng/api": "^8.9.27",
|
|
39
|
+
"@thi.ng/checks": "^3.5.1",
|
|
40
|
+
"@thi.ng/compare": "^2.2.23",
|
|
41
|
+
"@thi.ng/equiv": "^2.1.50",
|
|
42
|
+
"@thi.ng/errors": "^2.4.19",
|
|
43
|
+
"@thi.ng/random": "^3.6.34"
|
|
44
44
|
},
|
|
45
45
|
"devDependencies": {
|
|
46
46
|
"@microsoft/api-extractor": "^7.40.1",
|
|
@@ -165,5 +165,5 @@
|
|
|
165
165
|
"thi.ng": {
|
|
166
166
|
"year": 2018
|
|
167
167
|
},
|
|
168
|
-
"gitHead": "
|
|
168
|
+
"gitHead": "d660ae8fd1bf64d919b4334f19509f1f539d70f6\n"
|
|
169
169
|
}
|
package/quicksort.d.ts
CHANGED
package/sort-cached.d.ts
CHANGED
|
@@ -14,6 +14,8 @@ import type { Comparator, Fn } from "@thi.ng/api";
|
|
|
14
14
|
*
|
|
15
15
|
* @example
|
|
16
16
|
* ```ts
|
|
17
|
+
* import { sortByCachedKey } from "@thi.ng/arrays";
|
|
18
|
+
*
|
|
17
19
|
* // sort by length in descending order
|
|
18
20
|
* sortByCachedKey(["a","bbbb","ccc","dd"], (x) => x.length, (a, b) => b - a);
|
|
19
21
|
* // [ 'bbbb', 'ccc', 'dd', 'a' ]
|
package/swap.d.ts
CHANGED
package/swizzle.d.ts
CHANGED
|
@@ -9,6 +9,8 @@ import type { Fn } from "@thi.ng/api";
|
|
|
9
9
|
*
|
|
10
10
|
* @example
|
|
11
11
|
* ```ts
|
|
12
|
+
* import { swizzle } from "@thi.ng/arrays";
|
|
13
|
+
*
|
|
12
14
|
* swizzle([0, 0, 0])([1, 2, 3, 4]) // [ 1, 1, 1 ]
|
|
13
15
|
* swizzle([1, 1, 3, 3])([1, 2, 3, 4]) // [ 2, 2, 4, 4 ]
|
|
14
16
|
* swizzle([2, 0])([1, 2, 3]) // [ 3, 1 ]
|
package/threshold.d.ts
CHANGED