Skip to content

Latest commit

 

History

History
67 lines (45 loc) · 1.62 KB

File metadata and controls

67 lines (45 loc) · 1.62 KB

Getting started

KompKit Core is a small cross-platform utility library for Web (TypeScript), Android (Kotlin), and Flutter (Dart).

Status: V0.3.1-alpha.

Install

Web (npm)

npm i kompkit-core

npmjs.com/package/kompkit-core

Flutter / Dart (pub.dev)

Add to your pubspec.yaml:

dependencies:
  kompkit_core: ^0.4.0-alpha.0

Then run:

flutter pub get

pub.dev/packages/kompkit_core

Android (Gradle) — Local only

Not yet published to Maven. Use a local project reference for now.

dependencies {
    implementation(project(":kompkit-core"))
    implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.10.2")
}

Build and test locally

Run from the repository root:

# Build web package
npm run build

# Run tests for web and android
npm run test

Utilities

Utility Description
debounce Debounce a function call by a delay.
isEmail Validate a string with a basic email regex.
formatCurrency Format numbers into a localized currency string.
clamp Constrain a number within an inclusive [min, max] range.
throttle Limit a function to execute at most once per wait period.

Next: read the detailed guides for Web, Android, Flutter, and the Recipes.