Overview
graphitepdf-utils collects small, dependency-free helpers for collection transforms, composition, object-like values, and string parsing.
Scope
graphitepdf-utils includes:
- collection helpers such as
adjust,cast_array,drop_last,last,repeat,reverse, andwithout - composition helpers such as
composeandasync_compose - object and value helpers such as
get,pick,omit,map_values, andevolve - parsing and string helpers such as
parse_float,match_percent,capitalize, andupper_first
Installation
API Summary
| Category | Items |
|---|---|
| Collection helpers | adjust, cast_array, drop_last, last, repeat, reverse, without, OneOrMany |
| Function composition | compose, async_compose |
| Object and value helpers | Object, Value, Keys, Path, get, pick, omit, map_values, evolve, Transform, TransformMap |
| Parsing and string helpers | is_nil, capitalize, upper_first, parse_float, match_percent, PercentMatch |
Example
use ;
Design Principles
- keep the crate dependency-free
- prefer explicit helpers over framework-style abstractions
- keep utilities focused and composable
- support higher-level GraphitePDF crates without assuming a specific runtime
Role In GraphitePDF
This crate provides shared helper logic used by higher-level GraphitePDF crates. Keeping these APIs isolated makes it easier to reuse common transforms and parsing logic without pulling in rendering-specific dependencies.
License
MIT