@thi.ng/heaps
Advanced tools
Comparing version 2.1.74 to 2.1.75
# 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,8 @@ | ||
### [2.1.75](https://github.com/thi-ng/umbrella/tree/@thi.ng/heaps@2.1.75) (2024-06-21) | ||
#### ♻️ Refactoring | ||
- enforce uniform naming convention of internal functions ([56992b2](https://github.com/thi-ng/umbrella/commit/56992b2)) | ||
### [2.1.72](https://github.com/thi-ng/umbrella/tree/@thi.ng/heaps@2.1.72) (2024-04-20) | ||
@@ -14,0 +20,0 @@ |
@@ -16,13 +16,13 @@ import type { Comparator, IClear, ICopy, IEmpty, IInto, ILength, IStack, Maybe, Predicate, Predicate2 } from "@thi.ng/api"; | ||
* @example | ||
* ```ts | ||
* import { Heap } from "@thi.ng/heap"; | ||
* ```ts tangle:../export/heap.ts | ||
* import { Heap } from "@thi.ng/heaps"; | ||
* | ||
* h = new Heap([20, 5, 10]); | ||
* const h = new Heap([20, 5, 10]); | ||
* h.push(15); | ||
* | ||
* h.pop(); // 5 | ||
* h.pop(); // 10 | ||
* h.pop(); // 15 | ||
* h.pop(); // 20 | ||
* h.pop(); // undefined | ||
* console.log(h.pop()); // 5 | ||
* console.log(h.pop()); // 10 | ||
* console.log(h.pop()); // 15 | ||
* console.log(h.pop()); // 20 | ||
* console.log(h.pop()); // undefined | ||
* ``` | ||
@@ -29,0 +29,0 @@ */ |
@@ -163,3 +163,3 @@ import { compare } from "@thi.ng/compare/compare"; | ||
if (compare2(y, x) < 0) { | ||
res.splice(binarySearch(y, res, 0, n, compare2), 0, y); | ||
res.splice(__binarySearch(y, res, 0, n, compare2), 0, y); | ||
res.pop(); | ||
@@ -225,3 +225,3 @@ x = res[n - 1]; | ||
} | ||
const binarySearch = (x, vals, lo, hi, cmp) => { | ||
const __binarySearch = (x, vals, lo, hi, cmp) => { | ||
let m; | ||
@@ -228,0 +228,0 @@ while (lo < hi) { |
{ | ||
"name": "@thi.ng/heaps", | ||
"version": "2.1.74", | ||
"version": "2.1.75", | ||
"description": "Various heap implementations for arbitrary values and with customizable ordering", | ||
@@ -13,3 +13,3 @@ "type": "module", | ||
}, | ||
"homepage": "https://github.com/thi-ng/umbrella/tree/develop/packages/heaps#readme", | ||
"homepage": "https://thi.ng/heaps", | ||
"funding": [ | ||
@@ -41,11 +41,11 @@ { | ||
"dependencies": { | ||
"@thi.ng/api": "^8.11.2", | ||
"@thi.ng/compare": "^2.3.5", | ||
"@thi.ng/equiv": "^2.1.58" | ||
"@thi.ng/api": "^8.11.3", | ||
"@thi.ng/compare": "^2.3.6", | ||
"@thi.ng/equiv": "^2.1.59" | ||
}, | ||
"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" | ||
}, | ||
@@ -95,3 +95,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 | ||
@@ -13,0 +13,0 @@ > and anti-framework. |
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
48025
Updated@thi.ng/api@^8.11.3
Updated@thi.ng/compare@^2.3.6
Updated@thi.ng/equiv@^2.1.59