JavaScript's `split()` method is actually _very_ slow. Fast enough for end user facing apps, but too slow for libs to use repeatedly.
This is why Mongoose pre-splits schema paths: github.com/Automattic/mongoo…#NodeJS#MongoDB#JavaScript
We're adding an official mongoosejs/sample-apps repo. We'll be adding more modern sample apps in that repo.
First: a full TypeScript app using our new schema auto type inference
Star the repo please 🙏 github.com/mongoosejs/sample…#JavaScript#MongoDB#NodeJS
Pro tip: store values that you want to sort by in MongoDB. Don't compute them.
For example, if you want to sort vehicles by their average review score, store `averageReview`.
#NodeJS#MongoDB#JavaScript
Looking to display a user's name with just the first letter of their last name, like "John Smith" -> "John S."?
Here's how that works with Mongoose virtuals
Learn more: mongoosejs.com/docs/tutorial…#NodeJS#MongoDB#JavaScript