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

demo-functions

v1.0.9

Published

A minimal npm package with two exported functions.

Readme

demo-functions

A minimal npm package that exports two functions for debugging demonstration in React Native applications.

Functions

  • badFunction(): Always throws an error (perfect for debugging demonstration)
  • goodFunction(): Always returns a good value

🐛 Debugging Support

This package is specifically configured with comprehensive source maps to enable full debugging capabilities in React Native applications:

  • Source Maps: Generated for both JavaScript and TypeScript declaration files
  • Step-Through Debugging: Set breakpoints and step into package functions
  • Error Stack Traces: See original TypeScript line numbers in error messages
  • React Native Compatible: Optimized configuration for React Native debugging

Debugging Setup

  1. Install the package in your React Native app
  2. Set breakpoints in your app code where you call the package functions
  3. Start debugging - you can now step into the package source code!

📦 Installation

npm install demo-functions

💻 Usage

Individual Function Imports

import { badFunction, goodFunction } from "demo-functions";

// This will throw an error - perfect for debugging demonstration!
try {
  badFunction();
} catch (error) {
  console.log("Caught error:", error);
  // You can set breakpoints here and step into badFunction()
}

// This returns a good value
const result = goodFunction();
console.log(result); // "good function always returns good value"

Default Object Import

import demoFunctions from "demo-functions";

// Access functions through the default export
console.log(demoFunctions.badFunction());
console.log(demoFunctions.goodFunction());

TypeScript Support

import { badFunction, goodFunction } from "demo-functions";

// Full TypeScript support with proper type inference
const result: string = goodFunction();

🛠️ Development

npm run build    # Build the package with source maps
npm publish      # Publish to npm (automatically builds first)

📋 Package Information

  • Version: 1.0.6
  • Type: ES Module
  • TypeScript: Full support with declaration files
  • Source Maps: ✅ Enabled for debugging
  • React Native: ✅ Optimized for debugging

🚀 Publishing

To publish this package to npm:

  1. Run npm login (if not already logged in)
  2. Run npm publish

The package will automatically build before publishing, ensuring the latest source maps are included.

📄 License

MIT