Skip to content

Commit 6e21ac0

Browse files
committed
docs: rm counter instructions
1 parent 749be6d commit 6e21ac0

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

docs/upgrade-to-v5.md

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -96,14 +96,7 @@ The following deprecated methods have been removed:
9696
- Instead, generate a new ObjectId with the constructor: `new ObjectId()` or using the `static generate(time?: number)` method.
9797
- `ObjectId.prototype.generationTime`
9898
- Instead, use `static createFromTime()` and `getTimestamp()` to set and inspect these values on an `ObjectId()`
99-
10099
- `ObjectId.prototype.getInc`
101100
- `ObjectId.prototype.get_inc`
102101
- `ObjectId.get_inc`
103-
- The `static getInc()` is private since invoking it increments the next `ObjectId` index, instead users should inspect the counter on newly created ObjectId if it is needed.
104-
- See the following code snippet for how to obtain the counter field of an ObjectId:
105-
106-
```ts
107-
const oid = new ObjectId();
108-
const counterField = oid.id[9] << 16 | oid.id[10] << 8 | oid.id[11];
109-
```
102+
- The `static getInc()` is private since invoking it increments the next `ObjectId` index, so invoking would impact the creation of subsequent ObjectIds.

0 commit comments

Comments
 (0)