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

@bhaskarmantralahub/demo-nodejs

v1.0.0

Published

Node.js is essentially a Javascript runtime built on top of Chrome’s V8 Javascript engine.

Readme

Node.js is essentially a Javascript runtime built on top of Chrome’s V8 Javascript engine.

Single-Threaded Event Loop Architecture in Node.js

https://www.youtube.com/watch?v=xckH5s3UuX4


Following are not part of Javascript, but browser web api web-api.png https://www.youtube.com/watch?v=8zKuNo4ay8E


More details on Nodejs

https://scoutapm.com/blog/nodejs-architecture-and-12-best-practices-for-nodejs-development

~ % brew install node

~ % tsc -v Version 4.8.4

~ % npm -v
8.19.2

npm will be installed along nodejs

  1. Create a node-js project from Webstorm
  2. npm --init => Creates package.json and package-lock.json
  3. Install typescript npm install typescript --save-dev => Creates tsconfig.json
  4. Install ts-node npm install ts-node --save-dev

Run Configuration - Webstorm

https://www.jetbrains.com/help/webstorm/running-and-debugging-typescript.html#ws_ts_run_debug_server_side

run-configuration.png


Event Loop

Event loop polls and checks for any items in callback queue and move them to call stack for execution.

It constantly keeps track of the status of your asynchronous tasks (eg. the code in your callback functions) and moves them back to the execution queue when they’re completed. It operates in the same main thread.

Event Loop.png

Worker Pool - Auxiliary synchronous threads in the system kernel that Node.js can utilize for extensive disk and network-based async operations

node-js-arch.png


ESLint Config npm init @eslint/config

(OR)

Install ESLint Manually

npm install eslint @typescript-eslint/parser @typescript-eslint/eslint-plugin --save-dev

  • eslint: ESLint core library
  • @typescript-eslint/parser: parser that allows ESLint to understand TypeScript code
  • @typescript-eslint/eslint-plugin: plugin with a set of recommended TypeScript rules

Install Prettier

npm install eslint @typescript-eslint/parser @typescript-eslint/eslint-plugin --save-dev


Specify Node Versions with package n

npm install -g n

Install node specific version with 'n'

sudo n 14

List down all the available node vesions installed on machine

> n ls
node/14.21.2
node/19.3.0

Switch to specific version

> n
  ο node/14.21.2
  ο node/19.3.0

#### Use up/down arrow keys to select a version, return key to install, d to delete, q to quit

https://www.npmjs.com/package/n

Specify Node Versions with .nvmrc (Node Version Manager)

Install Node Version Manager : https://github.com/nvm-sh/nvm

node -v > .nvmrc => Is specifying that Node.js should be used

nvm use => To download, install, and switch to that version

nvm install => Call would then install dependencies in line with that version.

What is rc file stand for?

rc - run commands

  • .[program or binary name]rc
  • .eslintrc
  • .zshrc
  • .nvmrc

Jetbrains avoid finding JS extension files while working with Typescript files

Right click on build directory where js extension files exist and mark it as excluded exclude-directory

useful npm packages

useful npm packages