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

@codetiles/fturex

v0.0.6

Published

Feature toggle client for fturex React, Vue, Angular and Svelte applications

Readme

@codetiles/fturex

Feature toggle client for React, Vue, Angular, and Svelte applications.

Fetches your full feature manifest in the background and evaluates flags locally — no per-call network round-trips. Supports context-based targeting (user, role, tenant, etc.), automatic background refresh, localStorage persistence, and usage statistics.

Installation

npm install @codetiles/fturex

Quick start

import { FtureXClient } from "@codetiles/fturex";

const client = new FtureXClient(
  { baseUrl: "url-to-fturex-platform", appKey: "your-app-key" },
  { refreshIntervalSeconds: 30 },
);

await client.initialize();

if (await client.isEnabled("my-feature")) {
  // feature is on
}

// With context
if (
  await client.isEnabledWithContext("beta-feature", {
    role: "admin",
    userId: "user-123",
  })
) {
  // feature is on for this user
}

client.dispose();

React

import {
  FeatureToggleProvider,
  useFeatureToggle,
  FeatureToggle,
} from "@codetiles/fturex/react";

// Wrap your app
export function App() {
  return (
    <FeatureToggleProvider config={{ baseUrl: "...", appKey: "..." }}>
      <MyApp />
    </FeatureToggleProvider>
  );
}

// Hook
function MyComponent() {
  const { isEnabled, loading } = useFeatureToggle("my-feature");
  if (loading) return <Spinner />;
  return isEnabled ? <NewUI /> : <OldUI />;
}

// Component
function MyOtherComponent() {
  return (
    <FeatureToggle featureName="my-feature">
      <NewUI />
    </FeatureToggle>
  );
}

Vue

// main.ts
import { createApp } from "vue";
import { FtureXClient } from "@codetiles/fturex";
import { FeatureToggleClientKey } from "@codetiles/fturex/vue";

const client = new FtureXClient({ baseUrl: "...", appKey: "..." });
await client.initialize();

const app = createApp(App);
app.provide(FeatureToggleClientKey, client);
app.mount("#app");
<!-- MyComponent.vue -->
<script setup lang="ts">
import { useFeatureToggle } from "@codetiles/fturex/vue";

const { isEnabled, loading } = useFeatureToggle("my-feature");
</script>

<template>
  <NewUI v-if="!loading && isEnabled" />
  <OldUI v-else-if="!loading" />
</template>

SFC component (requires Vue SFC compiler):

import FeatureToggle from "@codetiles/fturex/vue/FeatureToggle.vue";

Angular

// app.module.ts
import { FtureXModule } from "@codetiles/fturex/angular";

@NgModule({
  imports: [FtureXModule.forRoot({ baseUrl: "...", appKey: "..." })],
})
export class AppModule {}
// my.component.ts
import { FtureXService } from '@codetiles/fturex/angular';

@Component({ ... })
export class MyComponent {
  isEnabled = false;

  constructor(private fturex: FtureXService) {}

  async ngOnInit() {
    this.isEnabled = await this.fturex.isEnabled('my-feature');
  }
}
<!-- Template directive -->
<div *featureToggle="'my-feature'">Only shown when feature is enabled</div>

<!-- Pipe -->
<div *ngIf="'my-feature' | featureToggle | async">...</div>

Svelte

// fturex.ts
import { FtureXClient } from "@codetiles/fturex";

export const client = new FtureXClient({ baseUrl: "...", appKey: "..." });
await client.initialize();
<!-- MyComponent.svelte -->
<script>
  import { useFeatureToggle } from '@codetiles/fturex/svelte';
  import { client } from './fturex';

  const feature = useFeatureToggle(client, 'my-feature');
</script>

{#if $feature.loading}
  <Spinner />
{:else if $feature.isEnabled}
  <NewUI />
{:else}
  <OldUI />
{/if}

OpenTelemetry

import { FtureXClient } from "@codetiles/fturex";
import { FtureXOtelHook } from "@codetiles/fturex/opentelemetry";

const client = new FtureXClient({ baseUrl: "...", appKey: "..." });
client.addHook(new FtureXOtelHook());
await client.initialize();

Configuration

FtureXConfiguration

| Property | Type | Required | Description | | ---------------- | --------- | -------- | ----------------------------------------- | | baseUrl | string | yes | API base URL | | appKey | string | yes | API authentication key | | sendStatistics | boolean | no | Report usage statistics (default: true) |

FeatureCacheOptions

| Property | Type | Default | Description | | ------------------------------- | --------- | ---------------------- | ----------------------------------- | | refreshIntervalSeconds | number | 30 | How often the manifest is refreshed | | enableLocalStoragePersistence | boolean | true | Persist manifest to localStorage | | localStorageKey | string | feature-toggle-cache | localStorage key |


Events

client.on("ready", () => console.log("Manifest loaded"));
client.on("update", () => console.log("Manifest refreshed"));

client.off("update", handler);

License

MIT — Anterprize