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

@ghoststrings/ai

v1.0.1

Published

Premium Over-the-Air (OTA) translation and content management SDK for Web, React, and Vanilla JavaScript applications.

Readme

GhostStrings Web SDK 👻🚀

The Premium Over-the-Air (OTA) Content & Localization Layer for Web Apps.

Update your website's copy, translations, marketing tags, and placeholder text instantly across any browser, framework (React, Vue, Next.js, etc.), or raw HTML pages — without a single developer build, redeploy, or page reload.

NPM Version License Bundle Size


✨ Features

  • Zero Layout Shift (CLS): Instant UI rendering from local storage cache, synchronized seamlessly in the background.
  • Modern Bundling: Dual CommonJS & ES Module outputs with built-in TypeScript definitions out-of-the-box.
  • React Native bindings: Includes hooks, context providers, and reactive text elements natively.
  • Auto DOM Interception: Scan, intercept, and live-update standard HTML nodes automatically using the intuitive data-lv attribute.
  • Dynamic Placeholders: Empower product and marketing teams to use simple template variables like {name} that are interpolated in real-time.

📦 Installation

Install the lightweight, zero-dependency SDK in your web project:

npm install @ghoststrings/ai

🛠️ Integration Quick Start

1. Vanilla JavaScript / TypeScript

For client-side vanilla projects or modern module bundles (Vite, Webpack, etc.):

import { GhostStrings } from '@ghoststrings/ai';

// Initialize the core SDK
const gs = new GhostStrings({
  projectId: 'pk_your_production_key', // Use dk_ for testing/development
  lang: 'es', // Optional default language code
  cacheTtl: 3600, // Background updates checked hourly
  enableDomInterception: true // Enable auto data-lv scanner
});

// Load strings from local storage instantly and request backend updates in the bg
await gs.init();

// Translate keys dynamically
const title = gs.get('hero_title', 'Welcome to our platform!');

// Support for template variables
const welcome = gs.get('welcome_msg', 'Hello {name}!', { name: 'Alice' });

⚛️ 2. React / Next.js / Remix

GhostStrings provides first-class React bindings. Wrap your application tree inside the GhostStringsProvider and leverage reactive hooks:

A. Set up the Provider

import React from 'react';
import { GhostStringsProvider } from '@ghoststrings/ai';

const config = {
  projectId: 'pk_your_production_key',
  fallbacks: {
    hero_title: 'Welcome to our premium app!',
    welcome_msg: 'Hello {username}!'
  }
};

export default function App() {
  return (
    <GhostStringsProvider config={config}>
      <MainLayout />
    </GhostStringsProvider>
  );
}

B. Consume Strings with Hooks & Components

import React from 'react';
import { useGhostStrings, GhostText } from '@ghoststrings/ai';

export function MainLayout() {
  const { getString, loading, setLanguage } = useGhostStrings();

  return (
    <div>
      {/* 1. Standard hook usage */}
      <h1>{getString('hero_title')}</h1>

      {/* 2. Standard hook with dynamic variables */}
      <p>{getString('welcome_msg', 'Welcome!', { username: 'Ahmad' })}</p>

      {/* 3. Sleek reactive Component (optimal for performance) */}
      <GhostText 
        id="cta_btn" 
        fallback="Join Now" 
        className="btn-primary" 
      />

      {/* 4. Live language switching */}
      <button onClick={() => setLanguage('fr')}>Switch to French</button>
    </div>
  );
}

🌐 3. Script Tag Integration (Low-Code / Webflow / HTML)

If you are using a static site generator, Webflow, Shopify, or raw HTML pages, drop in the compiled global browser bundle:

<head>
  <!-- Load the GhostStrings Premium Global Script -->
  <script 
    src="https://api.ghoststrings.ai/sdk.js" 
    data-project="pk_your_production_key"
    data-track="prod"
  ></script>
</head>
<body>
  <!-- Tag elements with data-lv attribute to intercept automatically -->
  <h1 data-lv="hero_title">Original Static Title</h1>
  <p data-lv="welcome_msg" data-lv-vars='{"name": "Alice"}'>Hello!</p>

  <script>
    // Listen for the ready event to perform custom scripting
    document.addEventListener('ghoststrings-ready', (e) => {
      const strings = e.detail;
      console.log('GhostStrings fully synchronized!', strings);
    });
  </script>
</body>

🔐 Security & Core Design

GhostStrings respects user privacy. We do not track or send Personally Identifiable Information (PII) to our servers. Only public localization string keys and localized copy are transferred securely.


📄 License

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


Built with ❤️ by GhostStrings