@thi.ng/arrays 2.0.0 → 2.0.6
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 +48 -0
- package/README.md +3 -2
- package/ensure-array.js +1 -1
- package/index.d.ts +21 -21
- package/index.js +21 -21
- package/package.json +12 -9
- package/quicksort.js +1 -1
- package/shuffle.d.ts +1 -1
- package/sort-cached.js +2 -2
- package/swap.d.ts +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,54 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [2.0.6](https://github.com/thi-ng/umbrella/compare/@thi.ng/arrays@2.0.5...@thi.ng/arrays@2.0.6) (2021-10-28)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @thi.ng/arrays
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
## [2.0.5](https://github.com/thi-ng/umbrella/compare/@thi.ng/arrays@2.0.4...@thi.ng/arrays@2.0.5) (2021-10-28)
|
|
15
|
+
|
|
16
|
+
**Note:** Version bump only for package @thi.ng/arrays
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
## [2.0.4](https://github.com/thi-ng/umbrella/compare/@thi.ng/arrays@2.0.3...@thi.ng/arrays@2.0.4) (2021-10-25)
|
|
23
|
+
|
|
24
|
+
**Note:** Version bump only for package @thi.ng/arrays
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
## [2.0.3](https://github.com/thi-ng/umbrella/compare/@thi.ng/arrays@2.0.2...@thi.ng/arrays@2.0.3) (2021-10-15)
|
|
31
|
+
|
|
32
|
+
**Note:** Version bump only for package @thi.ng/arrays
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
## [2.0.2](https://github.com/thi-ng/umbrella/compare/@thi.ng/arrays@2.0.1...@thi.ng/arrays@2.0.2) (2021-10-15)
|
|
39
|
+
|
|
40
|
+
**Note:** Version bump only for package @thi.ng/arrays
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
## [2.0.1](https://github.com/thi-ng/umbrella/compare/@thi.ng/arrays@2.0.0...@thi.ng/arrays@2.0.1) (2021-10-13)
|
|
47
|
+
|
|
48
|
+
**Note:** Version bump only for package @thi.ng/arrays
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
|
|
6
54
|
# [2.0.0](https://github.com/thi-ng/umbrella/compare/@thi.ng/arrays@1.0.3...@thi.ng/arrays@2.0.0) (2021-10-12)
|
|
7
55
|
|
|
8
56
|
|
package/README.md
CHANGED
|
@@ -42,10 +42,11 @@ ES module import:
|
|
|
42
42
|
|
|
43
43
|
[Skypack documentation](https://docs.skypack.dev/)
|
|
44
44
|
|
|
45
|
-
For
|
|
45
|
+
For Node.js REPL:
|
|
46
46
|
|
|
47
47
|
```text
|
|
48
|
-
|
|
48
|
+
# with flag only for < v16
|
|
49
|
+
node --experimental-repl-await
|
|
49
50
|
|
|
50
51
|
> const arrays = await import("@thi.ng/arrays");
|
|
51
52
|
```
|
package/ensure-array.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { isArray } from "@thi.ng/checks/is-array";
|
|
2
2
|
import { isArrayLike } from "@thi.ng/checks/is-arraylike";
|
|
3
|
-
import { ensureIterable } from "./ensure-iterable";
|
|
3
|
+
import { ensureIterable } from "./ensure-iterable.js";
|
|
4
4
|
/**
|
|
5
5
|
* Helper function to avoid unnecessary copying if `x` is already an
|
|
6
6
|
* array.
|
package/index.d.ts
CHANGED
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
export * from "./api";
|
|
2
|
-
export * from "./binary-search";
|
|
3
|
-
export * from "./bisect";
|
|
4
|
-
export * from "./ends-with";
|
|
5
|
-
export * from "./ensure-array";
|
|
6
|
-
export * from "./ensure-iterable";
|
|
7
|
-
export * from "./find";
|
|
8
|
-
export * from "./fill-range";
|
|
9
|
-
export * from "./fuzzy-match";
|
|
10
|
-
export * from "./is-sorted";
|
|
11
|
-
export * from "./insert";
|
|
12
|
-
export * from "./into";
|
|
13
|
-
export * from "./iterator";
|
|
14
|
-
export * from "./levenshtein";
|
|
15
|
-
export * from "./peek";
|
|
16
|
-
export * from "./quicksort";
|
|
17
|
-
export * from "./shuffle";
|
|
18
|
-
export * from "./sort-cached";
|
|
19
|
-
export * from "./starts-with";
|
|
20
|
-
export * from "./swap";
|
|
21
|
-
export * from "./swizzle";
|
|
1
|
+
export * from "./api.js";
|
|
2
|
+
export * from "./binary-search.js";
|
|
3
|
+
export * from "./bisect.js";
|
|
4
|
+
export * from "./ends-with.js";
|
|
5
|
+
export * from "./ensure-array.js";
|
|
6
|
+
export * from "./ensure-iterable.js";
|
|
7
|
+
export * from "./find.js";
|
|
8
|
+
export * from "./fill-range.js";
|
|
9
|
+
export * from "./fuzzy-match.js";
|
|
10
|
+
export * from "./is-sorted.js";
|
|
11
|
+
export * from "./insert.js";
|
|
12
|
+
export * from "./into.js";
|
|
13
|
+
export * from "./iterator.js";
|
|
14
|
+
export * from "./levenshtein.js";
|
|
15
|
+
export * from "./peek.js";
|
|
16
|
+
export * from "./quicksort.js";
|
|
17
|
+
export * from "./shuffle.js";
|
|
18
|
+
export * from "./sort-cached.js";
|
|
19
|
+
export * from "./starts-with.js";
|
|
20
|
+
export * from "./swap.js";
|
|
21
|
+
export * from "./swizzle.js";
|
|
22
22
|
//# sourceMappingURL=index.d.ts.map
|
package/index.js
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
export * from "./api";
|
|
2
|
-
export * from "./binary-search";
|
|
3
|
-
export * from "./bisect";
|
|
4
|
-
export * from "./ends-with";
|
|
5
|
-
export * from "./ensure-array";
|
|
6
|
-
export * from "./ensure-iterable";
|
|
7
|
-
export * from "./find";
|
|
8
|
-
export * from "./fill-range";
|
|
9
|
-
export * from "./fuzzy-match";
|
|
10
|
-
export * from "./is-sorted";
|
|
11
|
-
export * from "./insert";
|
|
12
|
-
export * from "./into";
|
|
13
|
-
export * from "./iterator";
|
|
14
|
-
export * from "./levenshtein";
|
|
15
|
-
export * from "./peek";
|
|
16
|
-
export * from "./quicksort";
|
|
17
|
-
export * from "./shuffle";
|
|
18
|
-
export * from "./sort-cached";
|
|
19
|
-
export * from "./starts-with";
|
|
20
|
-
export * from "./swap";
|
|
21
|
-
export * from "./swizzle";
|
|
1
|
+
export * from "./api.js";
|
|
2
|
+
export * from "./binary-search.js";
|
|
3
|
+
export * from "./bisect.js";
|
|
4
|
+
export * from "./ends-with.js";
|
|
5
|
+
export * from "./ensure-array.js";
|
|
6
|
+
export * from "./ensure-iterable.js";
|
|
7
|
+
export * from "./find.js";
|
|
8
|
+
export * from "./fill-range.js";
|
|
9
|
+
export * from "./fuzzy-match.js";
|
|
10
|
+
export * from "./is-sorted.js";
|
|
11
|
+
export * from "./insert.js";
|
|
12
|
+
export * from "./into.js";
|
|
13
|
+
export * from "./iterator.js";
|
|
14
|
+
export * from "./levenshtein.js";
|
|
15
|
+
export * from "./peek.js";
|
|
16
|
+
export * from "./quicksort.js";
|
|
17
|
+
export * from "./shuffle.js";
|
|
18
|
+
export * from "./sort-cached.js";
|
|
19
|
+
export * from "./starts-with.js";
|
|
20
|
+
export * from "./swap.js";
|
|
21
|
+
export * from "./swizzle.js";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@thi.ng/arrays",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.6",
|
|
4
4
|
"description": "Array / Arraylike utilities",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"module": "./index.js",
|
|
@@ -34,15 +34,15 @@
|
|
|
34
34
|
"test": "testament test"
|
|
35
35
|
},
|
|
36
36
|
"dependencies": {
|
|
37
|
-
"@thi.ng/api": "^8.0.
|
|
38
|
-
"@thi.ng/checks": "^3.0.
|
|
39
|
-
"@thi.ng/compare": "^2.0.
|
|
40
|
-
"@thi.ng/equiv": "^2.0.
|
|
41
|
-
"@thi.ng/errors": "^2.0.
|
|
42
|
-
"@thi.ng/random": "^3.
|
|
37
|
+
"@thi.ng/api": "^8.0.6",
|
|
38
|
+
"@thi.ng/checks": "^3.0.6",
|
|
39
|
+
"@thi.ng/compare": "^2.0.6",
|
|
40
|
+
"@thi.ng/equiv": "^2.0.6",
|
|
41
|
+
"@thi.ng/errors": "^2.0.6",
|
|
42
|
+
"@thi.ng/random": "^3.1.2"
|
|
43
43
|
},
|
|
44
44
|
"devDependencies": {
|
|
45
|
-
"@thi.ng/testament": "^0.1.
|
|
45
|
+
"@thi.ng/testament": "^0.1.6"
|
|
46
46
|
},
|
|
47
47
|
"keywords": [
|
|
48
48
|
"aos",
|
|
@@ -57,6 +57,9 @@
|
|
|
57
57
|
"publishConfig": {
|
|
58
58
|
"access": "public"
|
|
59
59
|
},
|
|
60
|
+
"engines": {
|
|
61
|
+
"node": ">=12.7"
|
|
62
|
+
},
|
|
60
63
|
"files": [
|
|
61
64
|
"*.js",
|
|
62
65
|
"*.d.ts"
|
|
@@ -132,5 +135,5 @@
|
|
|
132
135
|
"thi.ng": {
|
|
133
136
|
"year": 2018
|
|
134
137
|
},
|
|
135
|
-
"gitHead": "
|
|
138
|
+
"gitHead": "c17a556ad25f6882dfa8f806a1d9e8ed7ac7cd71"
|
|
136
139
|
}
|
package/quicksort.js
CHANGED
package/shuffle.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { TypedArray } from "@thi.ng/api";
|
|
2
2
|
import type { IRandom } from "@thi.ng/random";
|
|
3
|
-
import type { AnyArray } from "./api";
|
|
3
|
+
import type { AnyArray } from "./api.js";
|
|
4
4
|
/**
|
|
5
5
|
* Shuffles the items in the given index range of array `buf` using
|
|
6
6
|
* Fisher-yates and optional `rnd` PRNG.
|
package/sort-cached.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { isFunction } from "@thi.ng/checks/is-function";
|
|
2
2
|
import { compare } from "@thi.ng/compare/compare";
|
|
3
3
|
import { assert } from "@thi.ng/errors/assert";
|
|
4
|
-
import { quickSort } from "./quicksort";
|
|
5
|
-
import { multiSwap } from "./swap";
|
|
4
|
+
import { quickSort } from "./quicksort.js";
|
|
5
|
+
import { multiSwap } from "./swap.js";
|
|
6
6
|
/**
|
|
7
7
|
* Takes a `src` array and `key` array of function to provide the sort key of
|
|
8
8
|
* each item. If a function, it will be first applied to pre-compute a new array
|
package/swap.d.ts
CHANGED