@thi.ng/arrays
Advanced tools
Comparing version 2.9.6 to 2.9.7
# Change Log | ||
- **Last updated**: 2024-05-08T18:24:31Z | ||
- **Last updated**: 2024-06-21T19:34:38Z | ||
- **Generator**: [thi.ng/monopub](https://thi.ng/monopub) | ||
@@ -12,2 +12,9 @@ | ||
### [2.9.7](https://github.com/thi-ng/umbrella/tree/@thi.ng/arrays@2.9.7) (2024-06-21) | ||
#### ♻️ Refactoring | ||
- rename various rest args to be more semantically meaningful ([8088a56](https://github.com/thi-ng/umbrella/commit/8088a56)) | ||
- enforce uniform naming convention of internal functions ([56992b2](https://github.com/thi-ng/umbrella/commit/56992b2)) | ||
### [2.9.4](https://github.com/thi-ng/umbrella/tree/@thi.ng/arrays@2.9.4) (2024-04-20) | ||
@@ -14,0 +21,0 @@ |
@@ -1,3 +0,3 @@ | ||
const eqStrict = (a, b) => a === b; | ||
const levenshtein = (a, b, maxDist = Infinity, equiv = eqStrict) => { | ||
const __eqStrict = (a, b) => a === b; | ||
const levenshtein = (a, b, maxDist = Infinity, equiv = __eqStrict) => { | ||
if (a === b) { | ||
@@ -86,3 +86,3 @@ return 0; | ||
}; | ||
const normalizedLevenshtein = (a, b, maxDist = Infinity, equiv = eqStrict) => { | ||
const normalizedLevenshtein = (a, b, maxDist = Infinity, equiv = __eqStrict) => { | ||
const n = Math.max(a.length, b.length); | ||
@@ -89,0 +89,0 @@ return n > 0 ? levenshtein(a, b, maxDist, equiv) / n : 0; |
{ | ||
"name": "@thi.ng/arrays", | ||
"version": "2.9.6", | ||
"version": "2.9.7", | ||
"description": "Array / Arraylike utilities", | ||
@@ -13,3 +13,3 @@ "type": "module", | ||
}, | ||
"homepage": "https://github.com/thi-ng/umbrella/tree/develop/packages/arrays#readme", | ||
"homepage": "https://thi.ng/arrays", | ||
"funding": [ | ||
@@ -40,14 +40,14 @@ { | ||
"dependencies": { | ||
"@thi.ng/api": "^8.11.2", | ||
"@thi.ng/checks": "^3.6.4", | ||
"@thi.ng/compare": "^2.3.5", | ||
"@thi.ng/equiv": "^2.1.58", | ||
"@thi.ng/errors": "^2.5.7", | ||
"@thi.ng/random": "^3.8.0" | ||
"@thi.ng/api": "^8.11.3", | ||
"@thi.ng/checks": "^3.6.5", | ||
"@thi.ng/compare": "^2.3.6", | ||
"@thi.ng/equiv": "^2.1.59", | ||
"@thi.ng/errors": "^2.5.8", | ||
"@thi.ng/random": "^3.8.1" | ||
}, | ||
"devDependencies": { | ||
"@microsoft/api-extractor": "^7.43.2", | ||
"esbuild": "^0.21.1", | ||
"@microsoft/api-extractor": "^7.47.0", | ||
"esbuild": "^0.21.5", | ||
"typedoc": "^0.25.13", | ||
"typescript": "^5.4.5" | ||
"typescript": "^5.5.2" | ||
}, | ||
@@ -173,3 +173,3 @@ "keywords": [ | ||
}, | ||
"gitHead": "df34b4a9e650cc7323575356de207d78933bdcf3\n" | ||
"gitHead": "154c95cf9d6bab32174498ec3b5b5d87e42be7f9\n" | ||
} |
@@ -10,3 +10,3 @@ <!-- This file is generated - DO NOT EDIT! --> | ||
> [!NOTE] | ||
> This is one of 192 standalone projects, maintained as part | ||
> This is one of 193 standalone projects, maintained as part | ||
> of the [@thi.ng/umbrella](https://github.com/thi-ng/umbrella/) monorepo | ||
@@ -64,3 +64,3 @@ > and anti-framework. | ||
Package sizes (brotli'd, pre-treeshake): ESM: 2.99 KB | ||
Package sizes (brotli'd, pre-treeshake): ESM: 3.00 KB | ||
@@ -67,0 +67,0 @@ ## Dependencies |
@@ -44,5 +44,5 @@ import type { AnyArray, SwapFn } from "./api.js"; | ||
* | ||
* @param xs - arrays to swap in later | ||
* @param arrays - arrays to swap in later | ||
*/ | ||
export declare const multiSwap: (...xs: AnyArray[]) => SwapFn; | ||
export declare const multiSwap: (...arrays: AnyArray[]) => SwapFn; | ||
//# sourceMappingURL=swap.d.ts.map |
@@ -6,5 +6,5 @@ const swap = (arr, x, y) => { | ||
}; | ||
const multiSwap = (...xs) => { | ||
const [b, c, d] = xs; | ||
const n = xs.length; | ||
const multiSwap = (...arrays) => { | ||
const [b, c, d] = arrays; | ||
const n = arrays.length; | ||
switch (n) { | ||
@@ -34,3 +34,3 @@ case 0: | ||
swap(a, x, y); | ||
for (let i = n; i-- > 0; ) swap(xs[i], x, y); | ||
for (let i = n; i-- > 0; ) swap(arrays[i], x, y); | ||
}; | ||
@@ -37,0 +37,0 @@ } |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
83669
Updated@thi.ng/api@^8.11.3
Updated@thi.ng/checks@^3.6.5
Updated@thi.ng/compare@^2.3.6
Updated@thi.ng/equiv@^2.1.59
Updated@thi.ng/errors@^2.5.8
Updated@thi.ng/random@^3.8.1