Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 0 additions & 24 deletions .changeset/witty-items-drive.md

This file was deleted.

26 changes: 26 additions & 0 deletions packages/format/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,31 @@
# @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:

```js
// 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'
```

## 0.2.0

### Minor Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/format/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@obosbbl/format",
"version": "0.2.0",
"version": "0.3.0",
"description": "A collection of formatting methods for OBOS",
"repository": {
"url": "https://github.com/code-obos/public-frontend-modules"
Expand Down