Skip to content

Instantly share code, notes, and snippets.

@dayaki
Last active April 23, 2021 21:10
Show Gist options
  • Save dayaki/637b708b8749999309b850ca0e3a5231 to your computer and use it in GitHub Desktop.
Save dayaki/637b708b8749999309b850ca0e3a5231 to your computer and use it in GitHub Desktop.
Mongoose Tips
// compare mongoose id
user._id.toString() === request.params.id
// comparing mongoose ids and strings
first._id.equals(another._id)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment