Classy Mongo (v0.0.14) is a lightweight, class-based ODM for MongoDB, providing a simple way to define models using ES6 classes with property prototypes for schema definition. It offers methods like `findById`, `insertOne`, and static query helpers. Released infrequently, it is a minimal alternative to Mongoose, suitable for small projects or prototypes.
npm install classy-mongoNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Defines a Book model class with typed properties, inserts a document, retrieves it by ID, and accesses a computed property.
Use String.prototype instead of String for default values.
Define array fields as [String.prototype], not Arrays of plain strings.
Use `mongodb` driver directly for advanced connection options, or pass a connection string only.
Define a class that extends Model, e.g., class Book extends Model { ... }.Use String.prototype for type definition.