@thi.ng/arrays 2.0.7 → 2.0.8

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 CHANGED
@@ -3,6 +3,14 @@
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.8](https://github.com/thi-ng/umbrella/compare/@thi.ng/arrays@2.0.7...@thi.ng/arrays@2.0.8) (2021-11-10)
7
+
8
+ **Note:** Version bump only for package @thi.ng/arrays
9
+
10
+
11
+
12
+
13
+
6
14
  ## [2.0.7](https://github.com/thi-ng/umbrella/compare/@thi.ng/arrays@2.0.6...@thi.ng/arrays@2.0.7) (2021-11-03)
7
15
 
8
16
  **Note:** Version bump only for package @thi.ng/arrays
package/README.md CHANGED
@@ -51,7 +51,7 @@ node --experimental-repl-await
51
51
  > const arrays = await import("@thi.ng/arrays");
52
52
  ```
53
53
 
54
- Package sizes (gzipped, pre-treeshake): ESM: 2.12 KB
54
+ Package sizes (gzipped, pre-treeshake): ESM: 2.24 KB
55
55
 
56
56
  ## Dependencies
57
57
 
package/ends-with.js CHANGED
@@ -20,6 +20,6 @@ export const endsWith = (buf, needle, equiv = _eq) => {
20
20
  let j = needle.length;
21
21
  if (i < j)
22
22
  return false;
23
- while ((--i, --j >= 0 && equiv(buf[i], needle[j]))) { }
23
+ while ((--i, j-- > 0 && equiv(buf[i], needle[j]))) { }
24
24
  return j < 0;
25
25
  };
package/find.js CHANGED
@@ -20,7 +20,7 @@ export const find = (buf, x, equiv = _equiv) => {
20
20
  * @param equiv - equivalence predicate
21
21
  */
22
22
  export const findIndex = (buf, x, equiv = _equiv) => {
23
- for (let i = buf.length; --i >= 0;) {
23
+ for (let i = buf.length; i-- > 0;) {
24
24
  if (equiv(x, buf[i]))
25
25
  return i;
26
26
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thi.ng/arrays",
3
- "version": "2.0.7",
3
+ "version": "2.0.8",
4
4
  "description": "Array / Arraylike utilities",
5
5
  "type": "module",
6
6
  "module": "./index.js",
@@ -34,12 +34,12 @@
34
34
  "test": "testament test"
35
35
  },
36
36
  "dependencies": {
37
- "@thi.ng/api": "^8.1.0",
38
- "@thi.ng/checks": "^3.0.6",
39
- "@thi.ng/compare": "^2.0.7",
40
- "@thi.ng/equiv": "^2.0.6",
37
+ "@thi.ng/api": "^8.2.0",
38
+ "@thi.ng/checks": "^3.0.7",
39
+ "@thi.ng/compare": "^2.0.8",
40
+ "@thi.ng/equiv": "^2.0.7",
41
41
  "@thi.ng/errors": "^2.0.6",
42
- "@thi.ng/random": "^3.1.3"
42
+ "@thi.ng/random": "^3.1.4"
43
43
  },
44
44
  "devDependencies": {
45
45
  "@thi.ng/testament": "^0.1.6"
@@ -135,5 +135,5 @@
135
135
  "thi.ng": {
136
136
  "year": 2018
137
137
  },
138
- "gitHead": "852cd2450617c86d15d18477dc634f17f04202eb"
138
+ "gitHead": "5fe52419af63984ebe53032201b2a6174b9cb159"
139
139
  }
package/shuffle.js CHANGED
@@ -19,7 +19,7 @@ export const shuffleRange = (buf, start = 0, end = buf.length, rnd = SYSTEM) =>
19
19
  let n = end - start;
20
20
  const l = n;
21
21
  if (l > 1) {
22
- while (--n >= 0) {
22
+ while (n-- > 0) {
23
23
  const a = (start + rnd.float(l)) | 0;
24
24
  const b = (start + rnd.float(l)) | 0;
25
25
  const t = buf[a];
package/swap.js CHANGED
@@ -66,7 +66,7 @@ export const multiSwap = (...xs) => {
66
66
  default:
67
67
  return (a, x, y) => {
68
68
  swap(a, x, y);
69
- for (let i = n; --i >= 0;)
69
+ for (let i = n; i-- > 0;)
70
70
  swap(xs[i], x, y);
71
71
  };
72
72
  }
package/swizzle.js CHANGED
@@ -47,7 +47,7 @@ export const swizzle = (order) => {
47
47
  default:
48
48
  return (x) => {
49
49
  const res = [];
50
- for (let i = order.length; --i >= 0;) {
50
+ for (let i = order.length; i-- > 0;) {
51
51
  res[i] = x[order[i]];
52
52
  }
53
53
  return res;