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

mylibrary-edison

v1.0.1

Published

A lightweight, beginner-friendly JavaScript utility library exporting the ask function.

Readme

💡 mylibrary-edison

A clean, minimalist, and beginner-friendly JavaScript utility library built using modern Node.js and ES Modules.


📖 Description

mylibrary-edison is an educational, boilerplate-ready NPM package designed to demonstrate how to create, structure, and publish a modern ES Module (ESM) library. Out of the box, it exports a single, ready-to-implement utility function called ask().

It is designed for beginners who want to learn how modern ES module exports work, how to organize a clean package structure, and how to distribute their code via the NPM registry.


🛠️ Project Structure

The project has a clean and beginner-friendly layout with absolute minimal noise:

edison/
├── package.json   # Package configuration, metadata, and module entrypoints
├── index.js       # Main library file exporting the public API (ask function)
└── README.md      # Comprehensive documentation and publishing guide

File Breakdown:

  1. package.json: Configures the project metadata (name, version, author, license) and explicitly declares "type": "module" so Node.js loads files as ES Modules, enabling the use of import and export statements.
  2. index.js: Contains the source code of the library, exporting the single placeholder function ask().
  3. README.md: This guide! It describes the library, usage, and publishing instructions.

🚀 Installation

Once published to NPM, developers can install mylibrary-edison using their favorite package manager:

# Using npm
npm install mylibrary-edison

# Using yarn
yarn add mylibrary-edison

# Using pnpm
pnpm add mylibrary-edison

💻 Usage Example

Since mylibrary-edison uses modern ES Modules (ESM), you can import it into your JavaScript projects using the standard import syntax:

// Import the ask function from the mylibrary-edison library
import { ask } from 'mylibrary-edison';

// Call the function
ask();

[!NOTE] Ensure your consuming application's package.json includes "type": "module", or that you run your script with an .mjs extension so Node.js recognizes ES modules.


📦 How to Publish to NPM

Ready to share your library with the world? Follow these simple steps:

1. Create an NPM Account

If you haven't already, sign up for a free account at npmjs.com.

2. Log In to NPM via CLI

Run the following command in your terminal to authenticate your machine:

npm login

You will be prompted for your username, password, email, and a one-time password (OTP) sent to your email.

3. Check for Package Name Availability

Before publishing, make sure the name mylibrary-edison isn't already taken on NPM. If it is, update the "name" field in your package.json to something unique (e.g., @your-username/mylibrary-edison or mylibrary-edison-utility).

4. Publish Your Package

Run the following command to make the package public on the registry:

npm publish --access public

🎉 Congratulations! Your library is now live on NPM!


🔢 Semantic Versioning (SemVer) Explanation

NPM packages follow Semantic Versioning rules, represented as MAJOR.MINOR.PATCH (e.g., 1.0.0):

  • PATCH (e.g., 1.0.1): Incremented for backwards-compatible bug fixes.
  • MINOR (e.g., 1.1.0): Incremented for new backwards-compatible functionality or features.
  • MAJOR (e.g., 2.0.0): Incremented for API-breaking changes that require consumers to update their code.

To update your version before publishing a new release, you can use the npm utility:

# Increments patch version (1.0.0 -> 1.0.1)
npm version patch

# Increments minor version (1.0.0 -> 1.1.0)
npm version minor

# Increments major version (1.0.0 -> 2.0.0)
npm version major

📄 License

This project is licensed under the MIT License. Feel free to use, modify, and distribute it as you see fit.