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

sheetsandbox

v1.0.0

Published

Simple Node.js SDK for SheetSandbox - Turn Google Sheets into your MVP database. Easy to understand, ready to extend.

Readme

SheetSandbox SDK for Node.js

A simple and easy-to-understand Node.js SDK for SheetSandbox - Turn Google Sheets into your production-ready database.

🎯 Features

  • Simple & Clean - Easy to understand code without complex parts
  • Basic CRUD Operations - Get, GetById, and Post
  • Promise-based - Modern async/await support
  • Lightweight - Minimal dependencies
  • Ready to Extend - Clean architecture for future enhancements

📦 Installation

npm install sheetsandbox

🚀 Quick Start

import SheetSandbox from 'sheetsandbox';

// Initialize the client
const client = new SheetSandbox('your-api-token');

// Users -> SheetName

// Create a record
const result = await client.post('Users', {
  name: 'John Doe',
  email: '[email protected]'
});

// Get all records
const users = await client.get('Users');

// Get a specific record
const user = await client.getById('Users', 1);

📖 API Reference

Constructor

const client = new SheetSandbox(token, options);

Parameters:

  • token (string, required) - Your SheetSandbox API token
  • options (object, optional)
    • baseURL (string) - API base URL (default: 'http://localhost:3001/api')
    • timeout (number) - Request timeout in ms (default: 30000)

Methods

get(tableName)

Get all records from a table.

const result = await client.get('Users');

if (result.success) {
  console.log(result.data); // Array of records
}

Returns: Promise<Object>

  • success (boolean) - Operation status
  • data (array) - Array of records
  • status (string) - 'success' or 'error'
  • error (string) - Error message (if failed)

getById(tableName, id)

Get a specific record by ID.

const result = await client.getById('Users', 1);

if (result.success) {
  console.log(result.data); // Single record
}

Parameters:

  • tableName (string) - Name of the table
  • id (number|string) - Record ID (1-based index)

Returns: Promise<Object>

  • success (boolean) - Operation status
  • data (object) - Record data
  • status (string) - 'success' or 'error'
  • error (string) - Error message (if failed)

post(tableName, data)

Create a new record.

const result = await client.post('Users', {
  name: 'John Doe',
  email: '[email protected]'
});

if (result.success) {
  console.log('Record created!');
}

Parameters:

  • tableName (string) - Name of the table
  • data (object) - Record data to create

Returns: Promise<Object>

  • success (boolean) - Operation status
  • data (object) - Created record data
  • status (string) - 'success' or 'error'
  • error (string) - Error message (if failed)

setToken(newToken)

Update the API token.

client.setToken('new-api-token');

setBaseURL(newBaseURL)

Update the base URL.

client.setBaseURL('https://api.sheetsandbox.com');

getConfig()

Get current configuration.

const config = client.getConfig();
console.log(config);
// { baseURL: '...', timeout: 30000, hasToken: true }

💡 Examples

Waitlist Signup

import SheetSandbox from 'sheetsandbox';

const client = new SheetSandbox('your-api-token');

async function addToWaitlist(email, name) {
  const result = await client.post('Waitlist', {
    email: email,
    name: name,
    timestamp: new Date().toISOString()
  });
  
  if (result.success) {
    console.log('✅ Added to waitlist!');
  } else {
    console.log('❌ Error:', result.error);
  }
}

addToWaitlist('[email protected]', 'Jane Doe');

Feedback Form

async function submitFeedback(feedback) {
  const result = await client.post('Feedback', {
    message: feedback.message,
    rating: feedback.rating,
    email: feedback.email,
    submitted_at: new Date().toISOString()
  });
  
  return result.success;
}

Get User List

async function getUserList() {
  const result = await client.get('Users');
  
  if (result.success) {
    result.data.forEach(user => {
      console.log(`${user.name} - ${user.email}`);
    });
  }
}

🔧 Error Handling

All methods return a consistent response format:

const result = await client.get('Users');

if (result.success) {
  // Operation succeeded
  console.log(result.data);
} else {
  // Operation failed
  console.log(result.error);
}

🛣️ Roadmap

This is a simplified version designed to be easy to understand and extend. Future enhancements may include:

  • [ ] Batch operations (create multiple records at once)
  • [ ] Advanced filtering and sorting
  • [ ] Duplicate prevention
  • [ ] Update and delete operations
  • [ ] Pagination support
  • [ ] Retry logic
  • [ ] TypeScript support

📝 License

MIT

🔗 Links

💬 Support

For issues and questions, please visit our GitHub Issues.