Skip to content

Commit 6a250e0

Browse files
committed
Add nullable string VO at README.md.
Close #19
1 parent 57e8e5e commit 6a250e0

1 file changed

Lines changed: 19 additions & 0 deletions

File tree

README.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ A collection of Value Objects to save time by generalizing types and format vali
1414
* [Nullable Int](#nullable-int)
1515
* [String value-objects](#string-value-objects)
1616
* [String](#string)
17+
* [Nullable String](#nullable-string)
1718

1819

1920
# Value-objects
@@ -64,4 +65,22 @@ my_str = String('potato')
6465

6566
# Getting raw value
6667
my_str.value() # returns -> 'potato'
68+
```
69+
70+
### Nullable String
71+
72+
```python
73+
from pyvalueobjects import NullableString
74+
75+
# Creation
76+
my_str = NullableString('potato')
77+
78+
# Getting raw value
79+
my_str.value() # returns -> 'potato'
80+
81+
# Creation
82+
my_nullable_str = NullableString(None)
83+
84+
# Getting raw value
85+
my_nullable_str.value() # returns -> None
6786
```

0 commit comments

Comments
 (0)