humanizer
3.0.1, released 2 years ago by kent-boogaart.com
Converts raw Dart values into human-friendly representations.
WASM-ready
What it does
A library that converts raw Dart values into readable formats for users. It supports approximate time formatting, cardinal and ordinal numbers, plurality, string casing and truncation, programming symbols, and units of measurement.
AI-written summary of version 3.0.1, based on the package's README and metadata. Report an inaccuracy
Use it when
- You need to display approximate relative time from a Duration
- You need to format numbers into cardinal or ordinal text
- You need to humanize units of measurement or large numbers
Skip it when
- You require robust multilingual localization beyond English
- You only need standard intl formatting without extra humanizer extensions
Strengths
- Broad API surface covering times, numbers, strings, and units
- Allows running calculations without loss of precision using Rational
Weaknesses
- Currently only includes an English implementation despite being locale-aware
Setup
- Kind
- Pure Dart
- Effort
- Low
- Code generation
- No
- Direct dependencies
- 4
import 'package:humanizer/humanizer.dart';
// Use humanizer extensions and types in your codeAlternatives
Packages that do the same job and could replace humanizer.
Works with
Packages commonly used together with humanizer: ones it builds on, ones built on it, and its own family.
- intlhumanizer depends on itA Dart library for internationalization and localization, providing message translation, plural/gender handling, and date/number formatting.
- decimalhumanizer depends on itArbitrary-precision decimal arithmetic for Dart
- rationalhumanizer depends on itAllows you to deal with rational numbers in Dart.