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

@fluxorg/sdk

v1.0.3

Published

Official SDK for Flux Drop file upload service

Readme

FluxDrop SDK

Official TypeScript/JavaScript SDK for FluxDrop file sharing service

TypeScript npm License API Version

Features

  • API v2 by default - Latest performance optimizations
  • Privacy Controls - Public/private file uploads
  • Bulk Operations - Upload and delete multiple files efficiently
  • Backward Compatible - Full support for v1 API
  • Universal - Works in browsers and Node.js
  • TypeScript - Full type safety and IntelliSense
  • Error Handling - Comprehensive error types and validation
  • Performance - Built-in retry logic and request monitoring
  • Developer Friendly - Fluent API with smart defaults

Installation

npm install @fluxorg/sdk

Quick Start

Basic Usage (v2 API)

import { FluxDropClient } from '@fluxorg/sdk';

// Initialize client (v2 by default)
const client = new FluxDropClient({
  apiKey: 'your-api-key'  // or set FLUXDROP_API_KEY env var
});

// Upload a file with privacy control (v2 feature)
const result = await client.upload(file, { isPublic: false });
console.log(`Uploaded: ${result.filename} (Private: ${!result.isFilePublic()})`);

// Bulk upload multiple files (v2 feature)
const files = [file1, file2, file3];
const bulkResult = await client.uploadBulk(files, { 
  isPublic: true,
  maxConcurrent: 3 
});
console.log(`Uploaded ${bulkResult.totalUploaded} files successfully`);

v1 API Compatibility

// Explicitly use v1 API if needed
const clientV1 = new FluxDropClient({
  apiKey: 'your-api-key',
  apiVersion: 'v1'
});

const result = await clientV1.upload(file);  // v1 behavior

What's New in v2

Enhanced Upload Response

const result = await client.upload(file, { isPublic: false });

// New v2 properties
console.log('Privacy:', result.isFilePublic());           // boolean
console.log('Performance:', result.getPerformanceMs());   // number (ms)
console.log('Formatted:', result.getFormattedPerformance()); // "45ms"

Bulk Operations

// Bulk Upload
const uploadResult = await client.uploadBulk(files, {
  isPublic: false,
  maxConcurrent: 3
});

// Bulk Delete  
const deleteResult = await client.deleteBulk(fileIds, {
  maxConcurrent: 5
});

console.log(`Success: ${uploadResult.totalUploaded}, Failed: ${uploadResult.totalFailed}`);

Performance & Privacy

  • isPublic parameter: Control file visibility
  • _perf field: Request duration in milliseconds
  • Bulk operations: Parallel processing for better performance
  • Backward compatible: All v1 code continues to work

Configuration

const client = new FluxDropClient({
  apiKey: 'your-api-key',           // Required (or FLUXDROP_API_KEY env var)
  apiVersion: 'v2',                 // 'v1' or 'v2' (default: v2)
  baseUrl: 'https://fluxdrop.xyz/api', // API base URL
  timeout: 30000,                   // Request timeout (ms)
  retryAttempts: 3,                 // Retry failed requests
  debug: false                      // Enable debug logging
});

API Methods

Upload Operations

  • upload(file, options?) - Upload single file with v2 options
  • uploadBulk(files, options?) - Upload multiple files (v2 only)

File Management

  • listFiles(options?) - List uploaded files with pagination
  • getFile(fileId) - Get file details
  • deleteFile(fileId) - Delete single file
  • deleteBulk(fileIds, options?) - Delete multiple files (v2 only)

Utility Methods

  • getDownloadUrl(fileId) - Get direct download URL
  • getShareUrl(fileId) - Get shareable URL
  • fileExists(fileId) - Check if file exists
  • getFileCount() - Get total file count
  • getApiVersion() - Get current API version
  • isV2Api() - Check if using v2 API

Error Handling

import { ValidationError, AuthenticationError, RateLimitError } from '@fluxorg/sdk';

try {
  const result = await client.upload(file);
} catch (error) {
  if (error instanceof ValidationError) {
    console.error('Validation failed:', error.message);
  } else if (error instanceof AuthenticationError) {
    console.error('Auth failed:', error.message);
  } else if (error instanceof RateLimitError) {
    console.error('Rate limited:', error.retryAfter);
  }
}

Environment Support

  • Node.js 16+
  • Modern browsers (Chrome, Firefox, Safari, Edge)
  • Web Workers
  • TypeScript 4.0+
  • ESM & CommonJS

Contributing

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add some amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

License

This project is licensed under the GPL License - see the LICENSE file for details.


Made with ❤️ by Flux Org