-
-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Labels
Description
Like this:
import assert from "assert";
import vs from "value-schema";
// accepts both number and integer
const schema = vs.union({
schemas: [vs.number(), vs.string()],
});
assert.strictEqual(schema.applyTo(1), 1);
assert.strictEqual(schema.applyTo("a"), "a");Reactions are currently unavailable