Skip to content

Conversation

@github-actions
Copy link
Contributor

This PR was opened by the Changesets release GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated.

Releases

@obosbbl/format@0.3.0

Minor Changes

  • a92336d: add default entrypoint for formatting functions.

    This makes it easier to support both Norwegian and Swedish formatting in the same project,
    but it requires you to specify the wanted locale as an options argument to the method.

    Example:

    // Combined 🇳🇴🇸🇪 example
    import { formatOrganizationNumber } from "@obosbbl/format";
    formatOrganizationNumber("000000000", { locale: "no" }); // => '000 000 000'
    formatOrganizationNumber("0000000000", { locale: "se" }); // => '000000-0000'
    
    // 🇳🇴 only example
    import { formatOrganizationNumber } from "@obosbbl/format/no";
    formatOrganizationNumber("000000000"); // => '000 000 000'
    
    // 🇸🇪 only example
    import { formatOrganizationNumber } from "@obosbbl/format/se";
    formatOrganizationNumber("0000000000"); // => '000000-0000'

@alexanbj alexanbj merged commit 96a18f5 into main Jan 28, 2025
@alexanbj alexanbj deleted the changeset-release/main branch January 28, 2025 12:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants