A simple example NPM package.
$ npm install @rgz/hello-world-npm
const hello = require('@rgz/hello-world-npm');
hello.printHelloWorld();
$ mkdir my-package
$ cd my-package
$ git init
$ git remote add origin https://github.com/user/repo.git
$ npm init
$ npm login
$ npm publish
That's all folks !