@neutrium/formatter - v1.0.1
    Preparing search index...

    Type Alias ResolvedFormat

    ResolvedFormat: SupportedResolvedFormat | UnsupportedResolvedFormat

    Result of checking a specification with a formatter or parser's resolve method. Check supported before accessing success-only metadata or the failure's error.

    import { formatter } from "@neutrium/formatter";

    const spec = { kind: "currency", currency: "USD" } as const;
    const result = formatter.resolve(spec);

    if (result.supported)
    {
    console.log(formatter.format("1234.5", spec)); // "$1,234.50"
    }
    else
    {
    console.error(result.error.message);
    }