Skip to content

Release v0.4.0-alpha.0#25

Merged
Ivanmw97 merged 6 commits intoreleasefrom
develop
Mar 1, 2026
Merged

Release v0.4.0-alpha.0#25
Ivanmw97 merged 6 commits intoreleasefrom
develop

Conversation

@Ivanmw97
Copy link
Collaborator

@Ivanmw97 Ivanmw97 commented Mar 1, 2026

Summary

Adds two new cross-platform utilities (clamp and throttle) to KompKit Core 0.4.0-alpha.0, and fixes formatCurrency default currency from EUR to USD across all platforms. All utilities maintain full API parity across Web (TypeScript), Android (Kotlin), and Flutter (Dart) with comprehensive unit tests, full documentation updates, and consistent error handling.

clamp — constrain a number within an inclusive [min, max] range. Pure, synchronous, no dependencies.

throttle — limit a function to execute at most once per wait period. Fires immediately on first call, ignores subsequent calls during the cooldown. Returns a Throttled<T> object with cancel(), mirroring the existing Debounced<T> shape. Kotlin requires a CoroutineScope (same pattern as debounce); Dart uses Duration instead of bare milliseconds.

formatCurrency default — changed from EUR to USD to align with the en-US default locale. Breaking change at alpha; documented in CHANGELOG.

Type of Change

  • Bug fix
  • New feature
  • Dependency update
  • Documentation update
  • Refactor / code quality

Platforms Affected

  • Web (TypeScript)
  • Android (Kotlin)
  • Flutter (Dart)

Checklist

  • Web build/tests pass (npm run test:web && npm run build:web)
  • Android build/tests pass (cd packages/core/android && ./gradlew test)
  • Flutter build/tests pass (cd packages/core/flutter && flutter test)
  • API parity maintained across all affected platforms
  • Docs updated
  • CHANGELOG updated
  • Version bumped

Test counts:

  • Web ✅
  • Android ✅
  • Flutter ✅

…t currency to USD

- Change formatCurrency default currency from EUR to USD across all platforms (TypeScript, Kotlin, Dart)
- Add validation to throw on NaN/Infinity amounts in formatCurrency (RangeError in TypeScript, IllegalArgumentException in Kotlin, ArgumentError in Dart)
- Update all version references from 0.3.0-alpha to 0.3.1-alpha.0 across README, docs, package files, and SECURITY.md
- Update formatCurrency examples
- Add clamp(value, min, max) function to TypeScript, Kotlin, and Dart implementations
- Validate all arguments are finite numbers and min ≤ max, throwing on invalid input
- Add comprehensive unit tests for clamp across all platforms (normal range, edge cases, NaN/Infinity validation)
- Update documentation: README feature list, ARCHITECTURE.md API contract, platform guides (web.md, android.md, flutter.md), getting-started.md, and recipes.md
@Ivanmw97 Ivanmw97 merged commit 92fcc08 into release Mar 1, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant