Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
Rukanda Faridsi committed Aug 7, 2024
1 parent 273083b commit ea92054
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,4 +62,31 @@ yourCollection.editDocument(
key2: 'value1',
}
);
```

## Additional Notes

### Firestore ID

This helper does not use the default Firestore Document ID format to maintain consistency. It will generate its own Document ID based on the following rules:

- 30 characters
- Alphanumeric
- Lowercase

However, you can also customize your own ID by passing a second parameter to `addDocument`

```typescript
...

// Create a new document with your own ID
yourCollection.addDocument(
{
key1: 'value1',
key2: 'value2',
},
'your-own-id',
);

...
```

0 comments on commit ea92054

Please sign in to comment.