New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

mingobase

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mingobase

Translate MongoDB query syntax to Supabase JS queries

latest
npmnpm
Version
0.1.0
Version published
Weekly downloads
4
Maintainers
1
Weekly downloads
 
Created
Source

mingobase

Translate MongoDB query syntax to Supabase JS queries.

Install

npm install mingobase

Requires @supabase/supabase-js as peer dependency.

Usage

import { createClient } from "@supabase/supabase-js";
import { Query } from "mingobase";

const supabase = createClient(url, key);

const query = new Query({ age: { $gte: 18 }, status: "active" });

const { data } = await query
  .find(supabase, "users", ["id", "name", "email"])
  .sort({ createdAt: -1 })
  .limit(10)
  .all();

API

new Query(criteria)

Creates a reusable query with MongoDB-style filter criteria.

query.find(client, collection, projection?)

Returns a cursor with chainable methods:

MethodDescription
.sort({ field: -1 })Sort results (-1 desc, 1 asc)
.limit(n)Limit results
.skip(n)Skip first n results
.range(from, to)Get specific range
.all()Execute query
.query()Get raw Supabase query

Projection

// Array syntax
query.find(client, "users", ["id", "name"]);

// Object syntax
query.find(client, "users", { id: 1, name: 1 });

Supported Operators

MongoDBSupabase
$eq.eq()
$ne.neq()
$gt.gt()
$gte.gte()
$lt.lt()
$lte.lte()
$in.in()
$nin.not().in()
$regex.ilike()
$exists.is(null) / .not().is(null)
$andchained filters
$or.or()

License

MIT

Keywords

mingo

FAQs

Package last updated on 21 Jan 2026

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts