world-common
world-common provides foundational utilities used across all world modules. Whilst typically consumed as a transitive dependency through the Locale or Money modules, it exposes useful abstractions for formatting and common operations.
Dependency Resolution
libraryDependencies += "africa.shuwari" %% "world-common" % ""
Platform Support Matrix
| Module | JVM | Scala.js | Scala Native |
|---|---|---|---|
world-common |
✓ | ✓ | ✓ |
Note: Use the
%%%operator instead of%%when targeting multiple platforms.
Module Contents
Formatting Abstraction
The world.format.Formatter trait provides a consistent interface for converting types to string representations.
See Formatting Guide for detailed documentation.
Utilities
Common utility functions and types used across modules.
See Utilities Guide for detailed documentation.
Key Types
- world.format.Formatter - Generic formatting interface
- Utility functions for common operations
Design Goals
The Common module is designed with these principles:
- Minimal Dependencies - No external dependencies beyond Scala standard library
- Cross-Platform - Identical behaviour on JVM, JS, and Native
- Type Safety - Leverage Scala's type system for compile-time guarantees
- Composability - Small, focused abstractions that compose naturally
Next Steps
- Formatting Guide - Learn about the Formatter abstraction
- Utilities Guide - Explore common utilities
- API Reference - Complete API documentation
Platform Support
The Common module supports:
- JVM - Scala
- Scala.js -
- Scala Native -
All features work identically across platforms.
In this article