How I made banditypes, the smallest TS validation library

from blog Vladimir Klepov as a Coder, | ↗ original
I open-sourced banditypes — the smallest runtime validation library for TS / JS. It manages to fit all the basic functionality into an astounding 400 bytes. For reference, the popular zod and yup libraries are around 11KB, superstruct measures 1.8KB for the same set of functionality. Today, I'll tell you how I managed to pull this off. The...