Libraries & APIs · 1 min read
compare-guard
compare-guard focuses on a small but recurring application problem: comparing values without losing the distinction between an absent property and a property that exists with an empty value.
- My role
- Personal library
- Project scope
- Public source
Small utilities still need a contract
A nested path can be missing, explicitly null, or present with undefined. Treating every one of those cases as the same value makes comparisons difficult to reason about.
The library exposes comparison utilities with those cases in mind. Its value is in the behavior of edge cases rather than the size of the codebase.
Make behavior inspectable
The repository includes tests around comparison behavior and an API reference. The portfolio playground offers a small interactive example so a reader can explore a value comparison before opening the implementation.
Project notes
Public TypeScript library with a focused API reference and an interactive portfolio example.