Skip to content

Commit

Permalink
chore: added missing documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
gbassisp committed Mar 7, 2024
1 parent d1a9402 commit f6e5613
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 2 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@

## 0.2.1

- Added missing documentation on new feature

## 0.2.0

- Added support for creating a `Cardinal()` from a cardinal text, e.g., `Cardinal('one thousand')`
Expand Down
13 changes: 12 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,26 @@ Simple package to transform numbers into English numerals without flutter depend

## Features

Only integer cardinals are currently available, in the non-inclusive range ]-10^66, 10^66[
Only integer cardinals are currently available, in the non-inclusive range `]-10^66, 10^66[`


## Usage

It can be used to create a `Cardinal` number from `int` or `BigInt`:

```dart
final other = Cardinal(999);
print(other.enUk); // "nine hundred and ninety-nine"
print(other.enUs); // "nine hundred ninety-nine"
print(other.toString()); // "nine hundred ninety-nine"
```

It can also be used the other way around to convert cardinal text to int and BigInt:

```dart
final uk = Cardinal("nine hundred and ninety-nine");
print(uk.toInt()); // "999"
final us = Cardinal("nine hundred ninety-nine");
print(us.toInt()); // "999"
```
<!-- https://pub.dev/packages/english_numerals/versions/0.2.0 -->
5 changes: 5 additions & 0 deletions example/english_numerals_example.dart
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,9 @@ void main() {
print(other.enUk); // "nine hundred and ninety-nine"
print(other.enUs); // "nine hundred ninety-nine"
print(other); // "nine hundred ninety-nine"

final uk = Cardinal('nine hundred and ninety-nine');
print(uk.toInt()); // "999"
final us = Cardinal('nine hundred ninety-nine');
print(us.toInt()); // "999"
}
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: english_numerals
description: A package to convert numbers to and from their English written form, with null safety and no dependency on flutter.
version: 0.2.0
version: 0.2.1
homepage: https://github.com/gbassisp/english_numerals

environment:
Expand Down

0 comments on commit f6e5613

Please sign in to comment.