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

@fluxcontrolsdk/node-sdk

v0.2.0

Published

FluxControl Server-Side SDK for Node.js

Downloads

167

Readme

@fluxcontrolsdk/node-sdk

Official Node.js SDK for FluxControl - Enterprise Feature Flagging & Experimentation Platform

Installation

npm install @fluxcontrolsdk/node-sdk

Quick Start

import { FluxClient } from '@fluxcontrolsdk/node-sdk';

// Initialize the client
const client = new FluxClient('your-sdk-key', {
  endpoint: 'https://api.fluxcontrol.io'
});

// Start the client (fetches ruleset)
await client.start();

// Evaluate a boolean flag
const context = {
  userId: 'user-123',
  attributes: {
    plan: 'premium',
    country: 'US'
  }
};

const isEnabled = client.boolVariation('new-feature', context, false);

if (isEnabled) {
  // New feature code
} else {
  // Legacy code
}

// Clean up when shutting down
client.close();

Configuration Options

const client = new FluxClient('sdk-key', {
  endpoint: 'https://api.fluxcontrol.io',  // Required: FluxControl API endpoint
  pollIntervalMs: 30000,                    // Optional: Polling interval (default: 30s)
  backupFilePath: './flux_ruleset.json',   // Optional: Local backup file
  offlineMode: false                        // Optional: Start in offline mode
});

Configuration Parameters:

  • endpoint - Required. FluxControl API URL (e.g., 'https://api.fluxcontrol.io')
  • pollIntervalMs - Optional. Polling interval in milliseconds (default: 30000)
  • backupFilePath - Optional. Path to local backup file (default: './flux_ruleset.json')
  • offlineMode - Optional. Start in offline mode (default: false)

Offline Mode

For testing or air-gapped environments:

const client = FluxClient.loadFromFile('./ruleset.json');
await client.start();

Features

  • Local Evaluation: Sub-millisecond flag evaluation with no network calls
  • Automatic Polling: Keeps rulesets up-to-date in the background
  • Offline Fallback: Uses local backup if network is unavailable
  • TypeScript Support: Full type definitions included
  • Targeting Rules: Complex user targeting with AND/OR conditions
  • Percentage Rollouts: Gradual feature rollouts with consistent hashing

API Reference

FluxClient

Constructor

new FluxClient(sdkKey: string, config: FluxConfig)

Methods

  • start(): Promise<void> - Initialize and start polling
  • boolVariation(key: string, context: Context, defaultValue: boolean): boolean - Evaluate boolean flag
  • close(): void - Stop polling and clean up

Context

interface Context {
  userId: string;                                    // Required for percentage rollouts
  attributes?: Record<string, string | number | boolean>;  // Custom attributes
}

Documentation

Full documentation: https://docs.fluxcontrol.io

Support

  • GitHub Issues: https://github.com/manojsu/ubiquitous-spork/issues
  • Email: [email protected]

License

MIT