Registry / database / devcourse_skeleton

devcourse_skeleton

JSON →
library0.0.11jsnpmunverified

devcourse_skeleton is a lightweight Node.js package for dynamically generating SQL queries (SELECT, INSERT, UPDATE, DELETE) with support for subqueries via a literalize helper. Current version 0.0.11, released as an early-stage project with no recent updates. It provides validation and error handling for query inputs. Unlike full ORMs like Sequelize or TypeORM, it focuses on simple string-building with safety checks, suitable for small projects or learning SQL generation. However, the package is minimal, lacks TypeScript support, and has no clear release cadence.

npm install devcourse_skeleton
INSTALL
IMPORT
SIG · DEVCOURSE_SKELETON
D
devcourse_skeleton
databasejavascriptv0.0.11
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.

default
✓ import Skeleton from 'devcourse_skeleton'
✗ const Skeleton = require('devcourse_skeleton')
Package is ESM-only; CommonJS require will fail.
select, insert, update, delete
✓ import { select, insert, update, delete } from 'devcourse_skeleton'
✗ const { select, insert, update, delete } = require('devcourse_skeleton')
Named exports for CRUD operations.
literalize
✓ import { literalize } from 'devcourse_skeleton'
✗ import literalize from 'devcourse_skeleton'
literalize is a named export, not default.

Shows how to instantiate Skeleton with a MySQL connection and perform a SELECT query.

import Skeleton from 'devcourse_skeleton'; import mysql from 'mysql'; const connection = mysql.createConnection({ host: 'localhost', user: 'root', password: process.env.DB_PASSWORD ?? '', database: 'test' }); const db = new Skeleton(connection); async function run() { const users = await db.select('users', ['id', 'name'], { status: 'active' }); console.log(users); } run().catch(console.error);
Debug
Known issues
gotchaPackage uses ESM modules only; CommonJS require() will throw an error.
fix
Set type: 'module' in package.json or use import syntax.
affects: >=0.0.1
breakingNo TypeScript type definitions are provided; using in TypeScript projects will require manual .d.ts declarations.
fix
Create a declaration file or use 'any' type.
affects: >=0.0.1
gotchaThe package is very early stage (v0.0.11) and may have bugs; not recommended for production use.
fix
Consider mature alternatives like knex.js or sequelize.
affects: >=0.0.1
Errors
Common errors & fixes
ERR_REQUIRE_ESM
Project is using CommonJS require() but package is ESM-only.
fix
Use import syntax or rename file to .mjs.
TypeError: Skeleton is not a constructor
Default import used incorrectly; Skeleton is a default export but must be imported with default syntax.
fix
import Skeleton from 'devcourse_skeleton' (no curly braces).
Cannot find module 'mysql'
Missing peer dependency mysql.
fix
npm install mysql
Upgrade
Version history
0.0.11latest on npm
Audit
Dependencies
mysqlrequiredRuntime dependency for MySQL database connectivity
Agent activity
4 hits · last 30 days
node
4
Resources
devcourse_skeleton — npm install devcourse_skeleton · libregistry