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

@storage4everyone/sdk

v1.0.5

Published

Official TypeScript/JavaScript SDK for Storage4Everyone — Plug & Play Cloud Object Storage

Readme

@storage4everyone/sdk

Official TypeScript / JavaScript SDK for Storage4Everyone — Plug & Play Cloud Object Storage.

npm version license


⚡ Quickstart

1. Installation

npm install @storage4everyone/sdk

Or with pnpm / yarn / bun:

pnpm add @storage4everyone/sdk
# or
bun add @storage4everyone/sdk

2. Configure Your 2 Keys

Add the two required environment variables to your project's .env file:

# .env
S4E_API_KEY=s4e_live_your_api_key_here
S4E_BUCKET=s4e://workspace-01/test-bucket

Zero Extra Config: You do not need to configure endpoints, base URLs, or complex AWS credentials. The SDK automatically detects your workspace and bucket from the s4e:// URI format!


3. Usage

import { Storage4Everyone } from "@storage4everyone/sdk";

// Plug & play: Automatically reads S4E_API_KEY and S4E_BUCKET from process.env!
const s4e = new Storage4Everyone();

// 1. Upload a file (supports Buffer, Stream, Blob, string, or Uint8Array)
await s4e.upload("documents/invoice.pdf", fileBuffer);

// 2. Download a file
const file = await s4e.download("documents/invoice.pdf");
console.log(await file.text());

// 3. Generate a temporary download link (e.g. 15 minutes / 900 seconds)
const downloadUrl = await s4e.getDownloadUrl("documents/invoice.pdf", { expiresIn: 900 });
console.log("Download link:", downloadUrl);

// 4. List all files in your bucket
const { objects, count, totalBytes } = await s4e.list();
console.log(`Found ${count} files (${totalBytes} bytes)`);

// 5. Delete a file (automatically protected with soft-delete Trash Bin on paid tiers)
await s4e.delete("documents/invoice.pdf");

📂 Working with Multiple Buckets

You can target another bucket at any time without creating a new client:

// Target an avatars bucket
const avatars = s4e.bucket("s4e://workspace-01/avatars");

await avatars.upload("user_123.png", avatarBuffer);

🌐 Client-Side Direct Uploads (Presigned URLs)

To allow browser clients to upload directly to storage without passing files through your web server:

// On your server (e.g. Next.js API route or Express backend)
app.post("/api/get-upload-url", async (req, res) => {
  const { url } = await s4e.getUploadUrl("uploads/user-video.mp4", {
    contentType: "video/mp4",
    expiresIn: 900,
  });
  res.json({ uploadUrl: url });
});

// In your frontend client (browser)
const { uploadUrl } = await fetch("/api/get-upload-url").then(r => r.json());

// Direct PUT straight to Backblaze B2 storage
await fetch(uploadUrl, {
  method: "PUT",
  headers: { "Content-Type": "video/mp4" },
  body: selectedVideoFile,
});

🚀 Guide: Setting Up and Publishing to npmjs.com

Follow these steps to publish storage4everyone to the official npm registry:

Step 1: Create an npmjs.com Account

  1. Visit https://www.npmjs.com/signup and create your account.
  2. Verify your email address.
  3. Enable Two-Factor Authentication (2FA) in Account Settings → 2FA.

Step 2: Log In to npm via Terminal

In your terminal, authenticate with your npm account:

npm login

Follow the prompts to enter your username, password, and 2FA code (or one-time browser login).

Step 3: Verify Your Identity

Run:

npm whoami

It should print your npm username.

Step 4: Build the Package

Inside the storage4everyone directory:

cd storage4everyone
npm install
npm run build

Step 5: Publish to npm

Publish the package with public access:

npm publish --access public

Once published, anyone in the world will be able to install it instantly via:

npm install @storage4everyone/sdk

📄 License

Apache-2.0 © Storage4Everyone