Files
klz-cables.com/.pnpm-store/v10/files/d2/5705be2efd00eb16e7947e3cfda4a5885983ab172eda2e7c6d82a62df0361f379cc618b1478eb74f6057b3ee7d355ca1d1064a9a5a15c15e3522c822656858
Marc Mintel 5397309103
Some checks failed
Build & Deploy / 🔍 Prepare (push) Successful in 20s
Build & Deploy / 🧪 QA (push) Failing after 34s
Build & Deploy / 🏗️ Build (push) Has started running
Build & Deploy / 🚀 Deploy (push) Has been cancelled
Build & Deploy / 🧪 Smoke Test (push) Has been cancelled
Build & Deploy / ⚡ Lighthouse (push) Has been cancelled
Build & Deploy / 🔔 Notify (push) Has been cancelled
fix(products): fix breadcrumbs and product filtering (backport from main)
2026-02-24 16:04:21 +01:00

37 lines
1.2 KiB
Plaintext

# `icu-minify`
ICU message format compiler with a 650 bytes runtime ✨
## Features
1. **Build-time compilation** ⚡
Converts ICU messages to a compact JSON intermediate representation
2. **Minimal runtime** 📦
650 bytes (minified + compressed) with zero runtime dependencies
3. **Full ICU support** 🌍
`{arguments}`, `plural`, `select`, `selectordinal`, `date`, `time`, `number` and `<tags>`
## Usage
```ts
import compile from 'icu-minify/compile';
import format from 'icu-minify/format';
// At build time
const compiled = compile('Hello {name}!');
// ["Hello ", ["name"], "!"]
console.log(compiled);
// At runtime
format(compiled, 'en', {name: 'World'});
```
## Acknowledgments
This library is heavily inspired by [`icu-to-json`](https://github.com/jantimon/icu-to-json) and [`@lingui/message-utils`](https://github.com/lingui/js-lingui/tree/main/packages/message-utils), which similarly use an array-based intermediate representation for compiled messages.
## Design
For detailed design rationale, motivation, tradeoffs, and implementation details, see [RFC: Ahead-of-time compilation of ICU messages](../../rfcs/002-icu-message-precompilation.md).