Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a convenience method to check for ObjectIds #7

Closed
1 task done
chris-steele opened this issue Nov 21, 2023 · 1 comment
Closed
1 task done

Add a convenience method to check for ObjectIds #7

chris-steele opened this issue Nov 21, 2023 · 1 comment
Assignees
Labels
enhancement New or additional functionality

Comments

@chris-steele
Copy link
Contributor

Feature description

An identifier can be in string form or an instance of ObjectId. We can test for a string, but it would be useful to test for an ObjectId also.

Can you work on this feature?

  • I can contribute
@taylortom
Copy link
Collaborator

I think we should probably add this to the existing ObjectIdUtils (referenced from the MongoDBModule instance):

const mongodb = await this.app.waitForModule('mongodb')
mongodb.ObjectId.isObjectId(id)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New or additional functionality
Projects
Development

No branches or pull requests

2 participants