mongoosejs / mongoose-long

Provides Number Long support for Mongoose
MIT License
77 stars 16 forks source link

Bundle with mongoose proper #8

Closed ceefour closed 5 years ago

ceefour commented 5 years ago

I'm not really sure why mongoose-long, mongoose-int32, etc. has to be in their own npm packages.

These types are built-in supported MongoDB types, so people expect to be able to use them with mongoose without additional extra step.

It'd be great if this project can be bundled within mongoose.

vkarpov15 commented 5 years ago

They are built-in MongoDB types, but they don't necessarily map well to JavaScript types. Even BigInt doesn't quite line up with what a long is in MongoDB, so if you store something as an int32 in MongoDB it would still look like a Number in JavaScript.