From 32397a97cd60699def4b69d3e03cd4cb94daf966 Mon Sep 17 00:00:00 2001 From: Philipp Kunz Date: Sun, 13 Oct 2024 20:40:40 +0200 Subject: [PATCH] feat(BackpressuredArray): Add method to check if items are present in BackpressuredArray --- changelog.md | 55 ++++++++++++++++++++++++++++++++ ts/00_commitinfo_data.ts | 4 +-- ts/classes.backpressuredarray.ts | 4 +++ 3 files changed, 61 insertions(+), 2 deletions(-) create mode 100644 changelog.md diff --git a/changelog.md b/changelog.md new file mode 100644 index 0000000..78ba9e5 --- /dev/null +++ b/changelog.md @@ -0,0 +1,55 @@ +# Changelog + +## 2024-10-13 - 6.1.0 - feat(BackpressuredArray) +Add method to check if items are present in BackpressuredArray + +- Implemented a new method `checkHasItems` in the BackpressuredArray class to determine if the array contains any items. + +## 2024-05-29 to 2024-04-18 - 6.0.15 +Minor updates were made to documentation and descriptions. + +- Update project description + +## 2024-04-18 to 2024-02-25 - 6.0.14 +Several updates were made to configurations and json files. + +- Updated core components in the codebase +- Modified tsconfig settings +- Revised npmextra.json with githost configurations + +## 2024-02-25 to 2024-02-23 - 6.0.13 +No relevant changes. + +## 2024-02-23 to 2023-11-13 - 6.0.12 to 6.0.8 +Multiple core updates were performed to ensure stability and performance. + +- Fixed various issues in core components + +## 2023-11-13 to 2023-08-14 - 6.0.7 to 6.0.3 +Minor internal core updates. + +## 2023-08-14 to 2023-07-12 - 6.0.2 +Implemented a switch to a new organizational scheme. + +## 2023-01-18 to 2022-05-27 - 6.0.0 +Updated core functionalities; introduced breaking changes for compatibility with ECMAScript modules. + +- Core updates +- Switching from CommonJS to ECMAScript modules + +## 2022-05-27 to 2022-05-27 - 5.0.6 to 5.0.0 +Minor updates and a significant change in `objectmap` behavior to support async operations. + +- Included async behaviors in objectmap as a breaking change + +## 2020-05-04 to 2020-02-17 - 4.0.0 +Refactored ObjectMap; introduced new features. + +- Refactored ObjectMap with concat functionality as a breaking change +- Added .clean() to FastMap + +## 2020-02-17 to 2020-02-06 - 3.0.19 to 3.0.15 +Enhancements and new functionality in ObjectMap. + +- Added object mapping enhancements +- Introduced object map with unique keys diff --git a/ts/00_commitinfo_data.ts b/ts/00_commitinfo_data.ts index 9990e52..9d8285f 100644 --- a/ts/00_commitinfo_data.ts +++ b/ts/00_commitinfo_data.ts @@ -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.' } diff --git a/ts/classes.backpressuredarray.ts b/ts/classes.backpressuredarray.ts index da74330..707b4f7 100644 --- a/ts/classes.backpressuredarray.ts +++ b/ts/classes.backpressuredarray.ts @@ -34,6 +34,10 @@ export class BackpressuredArray { return this.data.length < this.highWaterMark; } + public checkHasItems(): boolean { + return this.data.length > 0; + } + waitForSpace(): Promise { return new Promise((resolve) => { if (this.checkSpaceAvailable()) {