Registry / database / jscalpel-orm

jscalpel-orm

JSON →
library0.2.0jsnpmunverified

jscalpel-orm is a lightweight JavaScript ORM library for object processing, version 0.2.0. It provides a simple API for mapping JavaScript objects to databases, with a focus on ease of use and minimal configuration. The library is distributed via npm and can be used in ES6 modules or directly in the browser via unpkg. As an early-stage package (v0.2), it may lack features of more mature ORMs like Sequelize or TypeORM, but offers a simpler alternative for small projects. Release cadence is not established yet.

npm install jscalpel-orm
INSTALL
IMPORT
SIG · JSCALPEL-ORM
J
jscalpel-orm
databasejavascriptv0.2.0
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.

JscalpelORM
import JscalpelORM from 'jscalpel-orm'
import { JscalpelORM } from 'jscalpel-orm'
Default export, not named. Use default import syntax.
JscalpelORM (CommonJS)
const JscalpelORM = require('jscalpel-orm')
const { JscalpelORM } = require('jscalpel-orm')
CommonJS default import, not named.
browser script
<script src="https://unpkg.com/jscalpel-orm@latest/dist/index.js"></script>
Exposes global JscalpelORM on window.

Defines a User model, creates an instance, saves it, and queries all users.

import JscalpelORM from 'jscalpel-orm'; // Define a model const User = JscalpelORM.define('User', { id: { type: 'number', primaryKey: true }, name: { type: 'string' }, email: { type: 'string', unique: true } }); // Create an instance const user = User.build({ id: 1, name: 'Alice', email: 'alice@example.com' }); // Save to database await user.save(); // Query all users const users = await User.findAll(); console.log(users);
Debug
Known issues
gotchaAlpha quality - API may change without notice.
fix
Pin exact version and test on upgrade.
affects: <1.0.0
gotchaNo transpilation provided; may not work in older browsers without polyfills.
fix
Use a bundler like Webpack with Babel.
affects: >=0.0.0
gotchaDocumentation is minimal; refer to source code for advanced features.
fix
Read the source on GitHub.
affects: >=0.0.0
Errors
Common errors & fixes
TypeError: JscalpelORM.define is not a function
Using named import instead of default import.
fix
Use 'import JscalpelORM from 'jscalpel-orm'' instead of '{ JscalpelORM }'.
Uncaught ReferenceError: JscalpelORM is not defined
Script not loaded or loaded after usage.
fix
Ensure script tag is before your script or use import.
Cannot find module 'jscalpel-orm'
Package not installed.
fix
Run 'npm install jscalpel-orm --save'.
Upgrade
Version history
0.2.0latest on npm
Audit
Dependencies

No dependency data recorded yet.

Agent activity
6 hits · last 30 days
node
6
Resources
jscalpel-orm — npm install jscalpel-orm · libregistry