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 🙏

© 2025 – Pkg Stats / Ryan Hefner

karanproducts-common

v1.0.16

Published

Common reusable components for the KaranProducts microservices architecture

Readme

Common NPM custom registry

Custom NPM module to share common code across all the middlewares.

NOTE:

Check the package.json file.

npm login
npm publish --access public

These will be written in TS but published in JS.

dependencies
npm install typescript del-cli --save-dev
to convert TS to JS and build the project
  • add this to package.json
"scripts": {
    "clean": "del-cli ./build/*",
    "build": "npm run clean && tsc"
  },
  • uncomment below lines in tsconfig.json
    "declaration": true, /* Generates corresponding '.d.ts' file. */
    "outDir": "./build",
  • run :
npm run build

This will take the TS file we coded, convert it into JS and write it into the build directory

If we want to publish it, we want to make sure we make changes so that the use/us while importing this module get access to the built file in the build folder instead of the index.js file in the root directory. Therefore, package.json:

  "main": "./build/index.js", // main file
  "types": "./build/index.d.ts", // main type def file 
  "files": [
    "build/**/*" // files which will be included in the final published module
  ],

Further, if you make any changes to the source code and want to patch it as a new version, you can either manually change the version number in the package.json file or simply:

note: make sure you commit your changes to git first
npm version patch

This won't publish it! In order to do so:

npm run build 
npm publish