@fuman/utils
Advanced tools
@@ -50,2 +50,5 @@ "use strict"; | ||
| } | ||
| get ended() { | ||
| return this.#ended; | ||
| } | ||
| peek() { | ||
@@ -52,0 +55,0 @@ return this.queue.peekFront(); |
@@ -15,2 +15,3 @@ import { Deque } from '../structures/deque.js'; | ||
| end(): void; | ||
| get ended(): boolean; | ||
| peek(): T | undefined; | ||
@@ -17,0 +18,0 @@ next(): T | undefined; |
@@ -15,2 +15,3 @@ import { Deque } from '../structures/deque.js'; | ||
| end(): void; | ||
| get ended(): boolean; | ||
| peek(): T | undefined; | ||
@@ -17,0 +18,0 @@ next(): T | undefined; |
@@ -48,2 +48,5 @@ import { Deque } from "../structures/deque.js"; | ||
| } | ||
| get ended() { | ||
| return this.#ended; | ||
| } | ||
| peek() { | ||
@@ -50,0 +53,0 @@ return this.queue.peekFront(); |
@@ -5,4 +5,8 @@ "use strict"; | ||
| #notify; | ||
| #promise; | ||
| wait() { | ||
| return new Promise((resolve) => { | ||
| if (this.#promise) { | ||
| return this.#promise; | ||
| } | ||
| return this.#promise = new Promise((resolve) => { | ||
| this.#notify = resolve; | ||
@@ -14,4 +18,5 @@ }); | ||
| this.#notify = void 0; | ||
| this.#promise = void 0; | ||
| } | ||
| } | ||
| exports.ConditionVariable = ConditionVariable; |
| class ConditionVariable { | ||
| #notify; | ||
| #promise; | ||
| wait() { | ||
| return new Promise((resolve) => { | ||
| if (this.#promise) { | ||
| return this.#promise; | ||
| } | ||
| return this.#promise = new Promise((resolve) => { | ||
| this.#notify = resolve; | ||
@@ -11,2 +15,3 @@ }); | ||
| this.#notify = void 0; | ||
| this.#promise = void 0; | ||
| } | ||
@@ -13,0 +18,0 @@ } |
+1
-1
| { | ||
| "name": "@fuman/utils", | ||
| "type": "module", | ||
| "version": "0.0.17", | ||
| "version": "0.0.19", | ||
| "description": "various utils", | ||
@@ -6,0 +6,0 @@ "license": "MIT", |
@@ -16,3 +16,3 @@ interface TwoWayLinkedList<K, T> { | ||
| #private; | ||
| constructor(capacity: number, MapImpl?: new <K, V>() => Map<K, TwoWayLinkedList<K, V>>); | ||
| constructor(capacity: number, MapImpl?: new () => Map<K, TwoWayLinkedList<K, V>>); | ||
| get(key: K): V | undefined; | ||
@@ -19,0 +19,0 @@ has(key: K): boolean; |
@@ -16,3 +16,3 @@ interface TwoWayLinkedList<K, T> { | ||
| #private; | ||
| constructor(capacity: number, MapImpl?: new <K, V>() => Map<K, TwoWayLinkedList<K, V>>); | ||
| constructor(capacity: number, MapImpl?: new () => Map<K, TwoWayLinkedList<K, V>>); | ||
| get(key: K): V | undefined; | ||
@@ -19,0 +19,0 @@ has(key: K): boolean; |
Network access
Supply chain riskThis module accesses the network.
Found 1 instance in 1 package
Network access
Supply chain riskThis module accesses the network.
Found 1 instance in 1 package
174139
0.21%5111
0.33%