-
Type:
Bug
-
Resolution: Unresolved
-
Priority:
Unknown
-
None
-
Affects Version/s: None
-
Component/s: None
Use Case
As a... js-bson user
I want... uuid constructor to verify types by name, not instanceof
So that... my code can work correctly with bundlers
User Experience
- In latest nodeless tests, we need to change `new UUID(dataKey)` to `new UUID(dataKey.toHexString(true))`, because dataKey is not the exact same `UUID` type
- We should be checking the inputs by name, like we do with buffer and other checks
- In latest nodeless tests, we should be able to go back to `new UUID(dataKey)`
Dependencies
- None
Risks/Unknowns
- `instanceof` is a problematic keyword, so we're removing a source of bugs
Acceptance Criteria
Implementation Requirements
- `instanceof` check is removed from UUID constructor
Testing Requirements
- In latest nodeless tests, we go back to `new UUID(dataKey)`
Documentation Requirements
- None
Follow Up Requirements
- None