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

storenow-sdk

v1.0.0

Published

JavaScript SDK for store.now - instant database for AI agents

Readme

@storenow/sdk

JavaScript SDK for store.now — instant database for AI agents.

Installation

npm install @storenow/sdk

Quick Start

import StoreNow from '@storenow/sdk'

// Initialize with your store ID and token
const db = new StoreNow('your-store-id', 'wt_your-token')

// Create a document
await db.collection('users').create({ name: 'John', age: 30 })

// Get all documents
const { documents } = await db.collection('users').getAll()

// Query with filters
const { documents: adults } = await db.collection('users').query({ 
  age: { $gte: 18 } 
})

Usage in HTML (Browser)

<script type="module">
  import StoreNow from 'https://esm.sh/@storenow/sdk'
  
  const db = new StoreNow('your-store-id', 'wt_your-token')
  
  // Now use db.collection('name') to store/retrieve data
</script>

API Reference

Initialize

const db = new StoreNow(storeId, token)

Collections

Collections are created automatically when you first write to them.

const habits = db.collection('habits')

Create Document

// Auto-generated ID
const doc = await habits.create({ name: 'Exercise', done: false })
console.log(doc.id) // e.g., 'abc123xyz'

// Custom ID
const doc = await habits.create({ name: 'Exercise' }, 'my-custom-id')

Get All Documents

const { documents, total } = await habits.getAll()

// With pagination
const { documents } = await habits.getAll({ 
  limit: 10, 
  offset: 0,
  order_by: 'created_at:desc' 
})

Get Single Document

const doc = await habits.get('document-id')

Query Documents

// Simple equality
const { documents } = await habits.query({ done: false })

// With operators
const { documents } = await habits.query({ 
  age: { $gte: 18 },
  status: { $in: ['active', 'pending'] }
})

Supported operators:

  • $eq - equals (default)
  • $ne - not equals
  • $gt - greater than
  • $gte - greater than or equal
  • $lt - less than
  • $lte - less than or equal
  • $in - in array

Update Document

await habits.update('document-id', { name: 'Exercise', done: true })

Delete Document

await habits.delete('document-id')

List Collections

const collections = await db.listCollections()
// [{ name: 'habits', document_count: 5, storage_bytes: 1024 }]

Examples

Habit Tracker

const db = new StoreNow('store-id', 'token')
const habits = db.collection('habits')

// Add habit
await habits.create({ 
  name: 'Exercise',
  streak: 0,
  lastCompleted: null
})

// Mark complete
const habit = await habits.get('habit-id')
await habits.update('habit-id', {
  ...habit.data,
  streak: habit.data.streak + 1,
  lastCompleted: new Date().toISOString()
})

// Get all habits
const { documents } = await habits.getAll()

Todo App

const db = new StoreNow('store-id', 'token')
const todos = db.collection('todos')

// Add todo
await todos.create({ text: 'Buy groceries', done: false })

// Get incomplete todos
const { documents } = await todos.query({ done: false })

// Mark complete
await todos.update('todo-id', { text: 'Buy groceries', done: true })

// Delete
await todos.delete('todo-id')

User Preferences

const db = new StoreNow('store-id', 'token')
const prefs = db.collection('preferences')

// Save preferences (using custom ID for easy retrieval)
await prefs.create({ 
  theme: 'dark',
  language: 'en',
  notifications: true
}, 'user-settings')

// Get preferences
const settings = await prefs.get('user-settings')

Get Your Credentials

  1. Go to store.now
  2. Create a new store
  3. Copy your Store ID and Token

Or via API:

curl -X POST https://store-now.storenow-api.workers.dev/api/v1/stores \
  -H "Content-Type: application/json" \
  -d '{"name": "my-app"}'

License

MIT