Yesterday I released my first npm package: glance

I wanted to understand the process of publishing an npm package a bit better. Specifically how hard it would be to support a package that works in legacy node, using the CommonJS style modules and current node (14 at time of writing) which has support for the new module import system (ESM).

Glance itself is a pretty simple package that simplifies objects and arrays of any depth. It lets you "glance" at them. I use it to look at large response objects in APIs so I can get a sense of what they are returning without being forced to console.log them in their entirety or drop into debugging them.

It's already pretty useful and I want to keep it simple and focused. The only feature i'm thinking of adding is allowing people to selectively choose certain keys to look for in objects and use those as the root for glancing. Basically allowing you to inspect objects at any level of depth, as long as you know the key you are specifically looking for.

Anyway it was a fun experiment and I expect I might follow up this post with one about my approach to releasing the package for the three different environments (browser, cjs and esm).