typescript-nedb-orm v1.7.0 is a lightweight ORM/ODM for @seald-io/nedb, a portable, file-based database for Node.js. Written entirely in TypeScript, it provides a decorator-free class-based approach to define models that extend a generic ORM class. Key features include automatic ID generation (via IID interface), CRUD operations (save, find, update, delete, remove, findOne, findById, count), and static methods for queries. Released under MIT, it targets Node.js environments. Maintained by a single developer, it is a simple alternative to heavier ORMs like Sequelize or Mongoose, leveraging NEDB's embedded nature but without support for relationships or migrations.
npm install typescript-nedb-ormNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Defines a Person model extending ORM, saves, queries, and deletes documents.
Ensure constructor copies all fields from the argument to this before calling super, or delegate to super(person) and assign after.
Always await static method calls, or use .then().
Include id: string in your interface or use a default UUID-like string.
Refer to @seald-io/nedb documentation for supported query operators.
Ensure the class extends ORM<IPerson> and that save() is called inside an async function with await.
Add import { IID, ORM } from 'typescript-nedb-orm' at the top of the file.Ensure methods are called on instances of Person, not on the class itself (except static methods).