feat(BackpressuredArray): Add method to check if items are present in BackpressuredArray
This commit is contained in:
@ -1,8 +1,8 @@
|
||||
/**
|
||||
* autocreated commitinfo by @pushrocks/commitinfo
|
||||
* autocreated commitinfo by @push.rocks/commitinfo
|
||||
*/
|
||||
export const commitinfo = {
|
||||
name: '@push.rocks/lik',
|
||||
version: '6.0.15',
|
||||
version: '6.1.0',
|
||||
description: 'Provides a collection of lightweight helpers and utilities for Node.js projects.'
|
||||
}
|
||||
|
@ -34,6 +34,10 @@ export class BackpressuredArray<T> {
|
||||
return this.data.length < this.highWaterMark;
|
||||
}
|
||||
|
||||
public checkHasItems(): boolean {
|
||||
return this.data.length > 0;
|
||||
}
|
||||
|
||||
waitForSpace(): Promise<void> {
|
||||
return new Promise<void>((resolve) => {
|
||||
if (this.checkSpaceAvailable()) {
|
||||
|
Reference in New Issue
Block a user