Read other articles

My first npm package

~2 min read  ⦁  Updated on Jan 21 2024

Summary: why, how, and next steps


In this article
  1. Introduction
  2. Creating my first npm package
  3. Conclusion

One day I was reading the MDN docs when I came accross the experimental Array.prototype.group function. It peaked my interest since once I had to write a several lines of code to accomplish a similar result when working on minhamola in 2021.

Introduction

The first example on the docs was enough to make me think “what if I created a polyfill for this”? Check the package here . It actually wasn’t a npm package at first, just a repository for sharing my approach to tackle the temporary lack of browser support for the group() function.

Creating my first npm package

I was able to go from layman to newbie (levelled 🆙) on all there is to know regarding creating and publishing npm packages, [automated] semver and Github actions for CI/CD. And this was only possible because I set out to share my ideas with others; this is why I believe that sharing our findings with others help us gain a better understanding on the topic at hand.

Conclusion

My recommendation is for you to work in public and for the public. Whether you do it using just Github or via blog posts or tweets, just do it; the benefits that stem from this exercise are precious.


Did you find a typo, or would like to contribute to the article? Here's the Github Link for this article.

Share this article: Twitter | Linkedin