Effect CommunityEC
Effect Community2y ago
6 replies
steida

Validating Maximum Size for User-Provided JSON in TypeScript

How to write it less silly? I have to validate the max size for any user-provided JSON array or object? Thank you

const SomeJson = S.Struct({ foo: S.String, bar: S.Boolean }).pipe(
  S.filter(maxEvoluJsonSize),
);
Was this page helpful?