Publishing an open-source library is easy; maintaining it is where the real work begins. When you release a package on npm, you are making a quiet promise to the community that you will handle bug reports, maintain documentation, and ensure compatibility with newer runtime versions.
Writing a clean API surface is critical. If users have to read through your source code to understand how to implement your utility, your README has failed. I have learned to spend just as much time on the TypeScript declaration files (`.d.ts`) and the markdown documentation as I do on the core logic.
Open-source development is one of the most rewarding endeavors in software engineering. It forces you to think about edge cases you would never encounter in a closed-source environment.