Anyone know of a good #JavaScript runtime type validation library?
I used runtypes before (it's very good), but it's around 3.6KB to bundle. https://bundlephobia.com/result?p=runtypes@5.0.1
There's also Joi, which takes up 42KB. https://bundlephobia.com/result?p=joi@17.3.0
@resynth1943 i use ajv. i needed schema stored in json to avoid duplicating schema from server in client. couldn't do this with yup or joi
@xkore oh nice! I personally find JSON Schema syntax to be a little clunky compared to something like TS interface defs, though.
QOTO: Question Others to Teach Ourselves An inclusive, Academic Freedom, instance All cultures welcome. Hate speech and harassment strictly forbidden.
@xkore oh nice! I personally find JSON Schema syntax to be a little clunky compared to something like TS interface defs, though.