News for hackers. Stuff that matters.
Re:Show HN: Verify JSON using minimal schema by franciscop on Thursday April 16, 2020 @04:19AM (#22887272)
I made a very similar library but based on `json-schema`: https://github.com/franciscop/json-ok

    import ok from 'json-ok';

    ok(24, { type: "number" });
    // No issue

    ok(24, { type: "string" });
    // throws ValidationError: is not of a type(s) string
I wanted to use `ok-json` as a tongue-in-cheek name, but apparently since there is already a library called `okjson` npm didn't allow me to use it.

There are no comments on this comment yet.