npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@thasoftschool/softorm

v1.0.5

Published

Lightweight dual SQL + Mongo ORM

Readme

SoftOrm

Lightweight ORM for SQL + MongoDB

Install

npm i softorm

Usage

const createORM = require("@thasoftschool/softorm")
//any one
const mysql = require("mysql2")
const mongoose = require("mongoose")

const sql = mysql.createPool({...}).promise()
await mongoose.connect("mongodb://localhost/db")

const db = createORM({
    //any one
  sql,
  mongo: mongoose.connection
})

const users = await db.users.data.all()





// ===============================
// SHOW (TABLES / COLLECTIONS)
// ===============================
await db.show.tabs


// ===============================
// READ
// ===============================
await db.users.data.all()
await db.users.data.all.limit(10)
await db.users.data.all.count()

await db.users.data.name.all.see("raj")
await db.users.data.id.all.see(5)

await db.users.data.name.exists("raj")
await db.users.data.id.exists(5)


const users = await db.users1.data.all.name.age.isActive()
const onlyNames = await db.users.data.all.name()




// ===============================
// INSERT (SINGLE)
// ===============================
await db.users.save.data({
  name: "raj",
  age: 21,
  isActive: true
})


// ===============================
// UPDATE
// ===============================

// update ALL rows
await db.users.update.data.all({
  isActive: true
})

// update by ONE condition
// first key = WHERE
await db.users.update.data.name({
  name: "raj",
  age: 24,
  isActive: true
})

// update by id
await db.users.update.data.id({
  id: 5,
  addamount: 200
})


// ===============================
// DELETE
// ===============================

// delete ALL
await db.users.data.all.delete()

// delete by field
await db.users.data.name.delete("raj")

// delete by id
await db.users.data.id.delete(5)


// ===============================
// BULK INSERT
// ===============================
await db.users.save.bulk([
  { name: "a", age: 20 },
  { name: "b", age: 21 },
  { name: "c", age: 22 }
])


// ===============================
// BULK UPDATE (MULTI CONDITION)
// ===============================
await db.users.update.bulk({
  where: { name: "a", isActive: false },
  set: { isActive: true, addamount: 500 }
})


// ===============================
// OTHER TABLE (EXAMPLE)
// ===============================
await db.courses.data.all()
await db.courses.data.price.all.see(499)

await db.courses.save.data({
  title: "Node",
  price: 499,
  isPaid: true
})












data.all()        → read all
save.data()       → insert one
update.data.all() → update all
update.data.name()→ update by one field
update.bulk()     → multiple conditions
delete()          → remove data