Skip to content

Commit a7d8517

Browse files
Carmine DimascioCarmine Dimascio
authored andcommitted
update reaadme
1 parent e101bc2 commit a7d8517

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

README.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,19 @@ const mUUID2 = MUUID.from('393967e0-8de1-11e8-9eb6-529269fb1459')
3838
const mUUID3 = MUUID.from(/** MongoDb Binary of SUBTYPE_UUID */)
3939
```
4040

41+
## Modes
42+
43+
uuid-mongodb offers two modes, **canonical** (default) and **relaxed**.
44+
45+
- **canonical** - A string format that emphasizes type preservation at the expense of readability and interoperability.
46+
- **relaxed** - A string format that emphasizes readability and interoperability at the expense of type preservation.
47+
48+
Modes are set globally. here is how set the mode
49+
50+
```javascript
51+
const mUUID = MUUID.mode('relaxed')
52+
```
53+
4154
## Formatting
4255

4356
UUIDs may be formatted using the following options:

0 commit comments

Comments
 (0)