@thi.ng/heaps
Advanced tools
Comparing version 2.1.73 to 2.1.74
# Change Log | ||
- **Last updated**: 2024-04-23T07:02:18Z | ||
- **Last updated**: 2024-05-08T18:24:31Z | ||
- **Generator**: [thi.ng/monopub](https://thi.ng/monopub) | ||
@@ -5,0 +5,0 @@ |
@@ -42,4 +42,3 @@ import { Heap } from "./heap.js"; | ||
const vals = this.values; | ||
if (n >= vals.length) | ||
return; | ||
if (n >= vals.length) return; | ||
return vals.slice(n, n + this.d); | ||
@@ -46,0 +45,0 @@ } |
@@ -118,4 +118,3 @@ import { compare } from "@thi.ng/compare/compare"; | ||
for (let i = values.length; i-- > 0; ) { | ||
if (pred(values[i])) | ||
return values[i]; | ||
if (pred(values[i])) return values[i]; | ||
} | ||
@@ -180,6 +179,4 @@ } | ||
const m = vals.length; | ||
if (n >= m) | ||
return; | ||
if (n === m - 1) | ||
return [vals[n]]; | ||
if (n >= m) return; | ||
if (n === m - 1) return [vals[n]]; | ||
return [vals[n], vals[n + 1]]; | ||
@@ -186,0 +183,0 @@ } |
{ | ||
"name": "@thi.ng/heaps", | ||
"version": "2.1.73", | ||
"version": "2.1.74", | ||
"description": "Various heap implementations for arbitrary values and with customizable ordering", | ||
@@ -40,11 +40,11 @@ "type": "module", | ||
"dependencies": { | ||
"@thi.ng/api": "^8.11.1", | ||
"@thi.ng/compare": "^2.3.4", | ||
"@thi.ng/equiv": "^2.1.57" | ||
"@thi.ng/api": "^8.11.2", | ||
"@thi.ng/compare": "^2.3.5", | ||
"@thi.ng/equiv": "^2.1.58" | ||
}, | ||
"devDependencies": { | ||
"@microsoft/api-extractor": "^7.43.0", | ||
"esbuild": "^0.20.2", | ||
"typedoc": "^0.25.12", | ||
"typescript": "^5.4.3" | ||
"@microsoft/api-extractor": "^7.43.2", | ||
"esbuild": "^0.21.1", | ||
"typedoc": "^0.25.13", | ||
"typescript": "^5.4.5" | ||
}, | ||
@@ -94,3 +94,3 @@ "keywords": [ | ||
}, | ||
"gitHead": "5dd66c18a3862a3af69a5b2f49563f7cbdd960c2\n" | ||
"gitHead": "df34b4a9e650cc7323575356de207d78933bdcf3\n" | ||
} |
@@ -94,4 +94,3 @@ import { compare } from "@thi.ng/compare/compare"; | ||
meld(heap) { | ||
if (!heap._size) | ||
return this; | ||
if (!heap._size) return this; | ||
if (!this._size) { | ||
@@ -98,0 +97,0 @@ this.root = heap.root; |
@@ -71,3 +71,3 @@ <!-- This file is generated - DO NOT EDIT! --> | ||
Package sizes (brotli'd, pre-treeshake): ESM: 2.01 KB | ||
Package sizes (brotli'd, pre-treeshake): ESM: 2.00 KB | ||
@@ -74,0 +74,0 @@ ## Dependencies |
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
47737
793
Updated@thi.ng/api@^8.11.2
Updated@thi.ng/compare@^2.3.5
Updated@thi.ng/equiv@^2.1.58