搜索插件、代码仓与 APP 分类

GitHub 代码仓kentcb/humanizer

humanizer

kentcb/humanizer open-source repository details.

humanizer 项目封面
星标
25
复刻
25
最近推送(UTC)
2025年1月13日
项目状态
未归档

原始 README

以下为英文项目原文快照,最新内容请访问 GitHub。

Humanizer

pub package

All Contributors

What?

A Dart library to convert values into human-friendly representations.

Why?

When writing user interfaces we often want to present data we have in a raw format in a way that makes sense to the end user, but doing so is often non-trivial. This library aims to make such conversions easy and flexible.

Where?

Firstly, install the humanizer package, then you can import Humanizer into your Dart code as follows:

import 'package:humanizer/humanizer.dart';

How?

This library has a broad API surface, and in fact has multiple API layers as discussed here. The following table gives a high level overview of the various features, with links to deeper discussion:

Feature Description
Approximate time Converts a Duration to a human-friendly approximation.
Cardinal numbers Converts an integral value to cardinal form (one, two, three etc).
Ordinal numbers Converts an integral value to ordinal form (1st / first, 2nd / second etc).
Plurality Alters the plurality of an input word.
String casing Converts input strings to Sentence case or Title Case.
String truncation Intelligently truncates input strings.
Symbols Converts programming symbol names into human-friendly representations.
Units of measurement Provides types to represent common units of measurement and the ability to convert those types to a human-readable form.

Note that whilst this library is locale-aware, it currently only includes an English implementation.

Who?

Thanks goes to these wonderful people (emoji key):


Kent Boogaart

💻

Arun Prakash

💻

This project follows the all-contributors specification. Contributions of any kind welcome!

Special thanks to these inspirational open source libraries:

Kent Boogaart GitHub avatar
GitHub 作者

Kent Boogaart ↗

Brisbane, Australia官方网站 ↗
语言Dart

此仓库发布的插件

使用的依赖

依赖清单 6 项

如何选择适合项目的代码仓?

先按使用场景筛选,再比较项目活跃情况,最后到原始仓库核对使用要求。

  1. 通过仓库名、作者或描述搜索,再按技术分类缩小范围。
  2. 结合星标、复刻与最近推送比较项目;星标反映社区关注,不代表质量保证。
  3. 使用前在 GitHub 核对 README、许可证与 Issues。

来源与维护

“A repository is the most basic element of GitHub.”

GitHub Docs — About repositories ↗