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

@alt-javascript/jsnosqlc-cosmosdb

v1.1.1

Published

JSNOSLQC Azure Cosmos DB driver via @azure/cosmos

Readme

@alt-javascript/jsnosqlc-cosmosdb

Language npm version License: MIT CI

JSNOSLQC driver for Azure Cosmos DB (NoSQL API) via the @azure/cosmos SDK.

Part of the @alt-javascript/jsnosqlc monorepo.

Install

npm install @alt-javascript/jsnosqlc-core @alt-javascript/jsnosqlc-cosmosdb

Usage

import { DriverManager, Filter } from '@alt-javascript/jsnosqlc-core';
import '@alt-javascript/jsnosqlc-cosmosdb'; // self-registers with DriverManager

// Local emulator (vnext-preview — serves HTTP on port 8081)
const client = await DriverManager.getClient('jsnosqlc:cosmosdb:local');

// Azure production
const client = await DriverManager.getClient(
  'jsnosqlc:cosmosdb:https://myaccount.documents.azure.com:443/',
  {
    key: process.env.COSMOS_KEY,
    database: 'myapp',
  }
);

const items = client.getCollection('items');

await items.store('i1', { name: 'Widget', category: 'tools', price: 9.99 });
const item = await items.get('i1');

const id = await items.insert({ name: 'Gadget', category: 'electronics', price: 49.99 });
await items.update(id, { price: 44.99 });

const filter = Filter.where('category').eq('tools').and('price').lt(15).build();
const cursor = await items.find(filter);
const tools = cursor.getDocuments();

await client.close();

URL Scheme

jsnosqlc:cosmosdb:<endpoint-or-local>

| URL | Description | |---|---| | jsnosqlc:cosmosdb:local | Local emulator (http://localhost:8081) | | jsnosqlc:cosmosdb:https://account.documents.azure.com:443/ | Azure production |

Connection Properties

| Property | Description | |---|---| | key | Cosmos DB account key (required for non-emulator) | | database | Database name (default: jsnosqlc) | | endpoint | Override emulator endpoint (default: http://localhost:8081) |

Database and Container Management

Databases and containers are created automatically on first use:

  • Database: created with createIfNotExists (default name: jsnosqlc)
  • Container: created with createIfNotExists, partition key { paths: ['/id'], kind: 'Hash' }

Local Development with Docker

The vnext-preview emulator serves HTTP (not HTTPS) on port 8081:

docker run --rm -d \
  -p 8081:8081 \
  mcr.microsoft.com/cosmosdb/linux/azure-cosmos-emulator:vnext-preview

Wait ~30 seconds for the emulator to become ready, then connect with jsnosqlc:cosmosdb:local.

Note: The vnext-preview emulator defaults to HTTP. The older Linux emulator uses HTTPS with a self-signed certificate. This driver targets vnext-preview.

Filter Translation

Filters are translated to Cosmos DB SQL (SELECT * FROM c WHERE ...):

| JSNOSLQC | Cosmos DB SQL | |---|---| | eq | c.field = @p0 | | ne | c.field != @p0 | | gt / gte | c.field > / >= @p0 | | lt / lte | c.field < / <= @p0 | | contains | ARRAY_CONTAINS(c.field, @p0) or CONTAINS(c.field, @p0) | | in | c.field IN (@p0, @p1, ...) | | nin | NOT (c.field IN (@p0, @p1, ...)) | | exists (true) | IS_DEFINED(c.field) | | exists (false) | NOT IS_DEFINED(c.field) | | and | (expr AND expr) | | or | (expr OR expr) | | not | NOT (expr) |

License

MIT