After creating several JavaScript functions, I noticed that I tend to use them across multiple projects. This prompted me to take things a step further and develop a small JavaScript Library specifically for my coding needs.
Similar to popular libraries like react, react-dom, and jquery, I envisioned being able to install my library via npm using the command:
npm install <my-personal-library>
As I delved into the process further, I discovered that I could utilize
npm publish <my-personal-library
, but was uncertain about how to properly format my library and its functions in order to effectively use and install them as an npm package.
In addition, the concept of creating type definitions for my functions and library - akin to @types/react - is completely foreign to me. Any guidance on this front would be greatly appreciated!