
I created my first package in the year 2020. I felt like it's already too late to create my own because a lot of NPM packages are already out there, but it didn't stop me to at least try to create one. For all the packages I initially created so far, one of them seems to at least reaches a lot of developers and invited some friendly contributors to enhance the existing codes. It is such a privilege that I become part of that package and helping those developers who are using our open source package.
This package is: check-password-strength
Enough intro, so let's get started on how to create and publish your first NPM package.
2.1 Run this command on terminal or cmd. npm init
and provide package description.

In this example, we are going to use jest to run a test in our basic package. so let's install jest npm i jest --save-dev
I prepared this sample code already but you can have a reference to this.

3.1 Run the npm publish --access=public

In my case, there's an OTP I setup up under Two Factor Authentication in my Account Settings (https://www.npmjs.com/settings/your_username/profile).
Once it's done, you may go to this to view all your packages: https://www.npmjs.com/settings/your_username/packages