Registry / database / ilorm
library0.15.2jsnpmunverified

ilorm (I Love ORM) is a modern ORM for Node.js that separates database from business logic using ECMAScript classes and schemas. Current stable version is 0.15.2. It provides universal connectors for MongoDB, SQL, Redis, REST, CSV, etc., a plugin ecosystem, query builder, and data validation. Unlike traditional ORMs like Sequelize or Mongoose, ilorm emphasizes class inheritance for plugins and universal data source support. Release cadence is irregular as it's still in early development (pre-1.0).

npm install ilorm
INSTALL
IMPORT
SIG · ILORM
I
ilorm
databasejavascriptv0.15.2
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

ilorm
import ilorm from 'ilorm'
const { ilorm } = require('ilorm')
ilorm is a default export; named export 'ilorm' does not exist in CommonJS.
schema
const { schema } = require('ilorm')
const schema = ilorm.schema
Both CJS and default import work; schema is a named export from the ES module.
newModel
import { newModel } from 'ilorm'
const { model } = require('ilorm')
The function is named 'newModel' not 'model'; named export only.

Create a schema, instantiate a model, and perform a simple query using ilorm.

import ilorm from 'ilorm'; import { schema, newModel } from 'ilorm'; const userSchema = schema.new({ firstName: schema.String().required(), lastName: schema.String().required(), age: schema.Number().min(0).max(120), }); const connection = {}; // Replace with actual connector, e.g., ilorm-connector-memory const User = newModel({ name: 'User', schema: userSchema, connector: connection, }); async function main() { const user = await User.query() .firstName.is('John') .findOne(); console.log(user); } main().catch(console.error);
Debug
Known issues
breakingVersion 0.x may have breaking changes across minor versions. Always pin exact version in package.json.
fix
Use 'ilorm': '0.15.2' in package.json instead of '^0.15.2'.
affects: >=0.1.0
breakingESM imports changed from named to default export in v0.12.0. Old 'import { ilorm } from 'ilorm'' no longer works.
fix
Use default import: 'import ilorm from 'ilorm''.
affects: >=0.12.0
breakingThe 'schema' function was renamed to 'schema.new' in v0.10.0. Direct use of 'schema({...})' breaks.
fix
Replace 'schema({...})' with 'schema.new({...})'.
affects: >=0.10.0
gotchaThis package is pre-1.0; API is unstable. Not recommended for production without extensive testing.
fix
Evaluate alternative stable ORMs like Sequelize or Mongoose for production.
affects: >=0.0.0
deprecatedThe 'ilorm.String()' syntax is deprecated in favor of 'schema.String()'.
fix
Use 'schema.String()' instead of 'ilorm.String()'.
affects: >=0.11.0
Errors
Common errors & fixes
Error: Cannot find module 'ilorm'
Missing installation or incorrect module resolution.
fix
Run 'npm install ilorm' and ensure node_modules contains the package.
TypeError: ilorm.schema is not a function
Using old import pattern with default import in CommonJS.
fix
Use 'const { schema } = require('ilorm')' or 'import { schema } from 'ilorm''.
Error: Schema must be created with schema.new()
Directly called schema() instead of schema.new().
fix
Replace 'schema({...})' with 'schema.new({...})'.
TypeError: Cannot read properties of undefined (reading 'firstName')
Query builder method chaining before defining schema or importing correctly.
fix
Ensure schema is defined and fields match; verify import paths.
Upgrade
Version history
0.15.2latest on npm
Audit
Dependencies

No dependency data recorded yet.

Agent activity
10 hits · last 30 days
node
10
Resources
packageilorm
ilorm — npm install ilorm · libregistry