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

@module-federation/sdk

v2.3.1

Published

A sdk for support module federation

Readme

@module-federation/sdk Documentation

  • This SDK provides utilities and tools to support the implementation of Module Federation in your projects.
  • It contains utility functions for parsing, encoding, and decoding module names, as well as generating filenames for exposed modules and shared packages.
  • It also includes a logger for debugging and environment detection utilities.
  • Additionally, it provides a function to generate a snapshot from a manifest and environment detection utilities.

Usage

// The SDK can be used to parse entry strings, encode and decode module names, and generate filenames for exposed modules and shared packages.
// It also includes a logger for debugging and environment detection utilities.
// Additionally, it provides a function to generate a snapshot from a manifest and environment detection utilities.
import { parseEntry, encodeName, decodeName, generateExposeFilename, generateShareFilename, createLogger, isBrowserEnv, isBrowserEnvValue, isDebugMode, getProcessEnv, generateSnapshotFromManifest } from '@module-federation/sdk';

// Parse an entry string into a RemoteEntryInfo object
parseEntry('entryString');

// Encode a module name with a prefix and optional extension
encodeName('moduleName', 'prefix');

// Decode a module name with a prefix and optional extension
decodeName('encodedModuleName', 'prefix');

// Generate a filename for an exposed module
generateExposeFilename('exposeName', true);

// Generate a filename for a shared package
generateShareFilename('packageName', true);

// Create a logger
const logger = createLogger('identifier');

// Check if the current environment is a browser
const inBrowser = isBrowserEnv();
const inBrowserStatic = isBrowserEnvValue;

// Check if the current environment is in debug mode
isDebugMode();

// Get the process environment
getProcessEnv();

// Generate a snapshot from a manifest
generateSnapshotFromManifest(manifest, options);

parseEntry

  • Type: parseEntry(str: string, devVerOrUrl?: string, separator?: string)
  • Parses a string into a RemoteEntryInfo object.

encodeName

  • Type: encodeName(name: string, prefix?: string, withExt?: boolean)
  • Encodes a name with a prefix and optional extension.

decodeName

  • Type: decodeName(name: string, prefix?: string, withExt?: boolean)
  • Decodes a name with a prefix and optional extension.

generateExposeFilename

  • Type: generateExposeFilename(exposeName: string, withExt: boolean)
  • Generates a filename for an expose.

generateShareFilename

  • Type: generateShareFilename(pkgName: string, withExt: boolean)
  • Generates a filename for a shared package.

createLogger

  • Type: createLogger(prefix: string)
  • Creates a logger for debugging.

isBrowserEnv

  • Type: isBrowserEnv(): boolean
  • Checks if the current environment is a browser.

isBrowserEnvValue

  • Type: isBrowserEnvValue: boolean
  • Static browser environment flag (tree-shakable when ENV_TARGET is defined).

isDebugMode

  • Type: isDebugMode()
  • Checks if the current environment is in debug mode.

getProcessEnv

  • Type: getProcessEnv()
  • Gets the process environment.

generateSnapshotFromManifest

  • Type: generateSnapshotFromManifest(manifest: Manifest, options?: IOptions)
  • Generates a snapshot from a manifest.

Testing

The SDK uses Jest for testing. The configuration can be found in jest.config.js. The tests are located in the tests directory.