it's simpler than theirs but it's functional, I'll leave the result of my library and the link to the article below, I hope you liked it ❤️
https://www.alura.com.br/artigos/criando-e-publicando-uma-biblioteca-javascript-no-npm
https://medium.com/xp-inc/cria%C3%A7%C3%A3o-de-biblioteca-typescript-c7eec577f1df