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

@liorandb/driver

v1.0.0

Published

A fully MongoDB-style, TypeScript-first Node.js driver for **LioranDB Server**.

Readme

@liorandb/driver

A fully MongoDB-style, TypeScript-first Node.js driver for LioranDB Server.

This driver mimics the official MongoDB Node.js Driver patterns:

  • client.connect() → connects & authenticates
  • client.db(name) → select database
  • db.collection(name) → select a collection
  • Collection helpers that look like MongoDB: insertOne, find, findOne, updateOne, deleteOne

🚀 Features

  • 100% MongoDB-like driver API
  • URI authentication (lioran://user:pass@host:port)
  • client.db().collection() pattern
  • Auto JWT login & token injection
  • Full TypeScript support
  • Zero dependencies except Axios

📦 Installation

npm install @liorandb/driver

Dev tools (if contributing):

npm install -D typescript ts-node-dev @types/node

🔌 Connection String Format

lioran://username:password@host:port

Example:

lioran://admin:secret@localhost:8080

🧩 Quick Start (MongoDB Style)

import { LioranDBClient } from "@liorandb/driver";

const client = new LioranDBClient("lioran://admin:admin@localhost:8080");

await client.connect();

const db = client.db("testDB");
const users = db.collection("users");

await users.insertOne({ name: "Swaraj", age: 17 });

const res = await users.find({ age: 17 });
console.log(res);

📚 Full API Reference

🌐 client.connect()

Authenticates using URI credentials and stores JWT internally.


🗄️ Databases

client.db(name)

Selects a database.


📁 Collections

db.collection(name)

Selects a collection from the database.


📄 Document Methods (MongoDB Style)

insertOne(document)

Inserts a single document.

await users.insertOne({ username: "dev" });

find(query)

Returns an array of matching documents.

await users.find({ active: true });

findOne(query)

Returns the first matching document.

await users.findOne({ id: "abc" });

updateOne(filter, update)

Updates fields of a single document.

await users.updateOne({ id: "abc" }, { age: 18 });

deleteOne(filter)

Deletes one document.

await users.deleteOne({ id: "abc" });

🏗 Project Structure

src/
  client.ts          // LioranDBClient
  db.ts              // DB wrapper
  collection.ts      // Collection wrapper
  index.ts
  types.ts
  utils/
    parseUri.ts

📤 Publishing

npm login
npm publish

🤝 Contributing

Follow MongoDB-style API structure. PRs welcome.


📄 License

MIT License