We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
In this example:
const s = require("superstruct"); const Query = s.object({ url: s.pattern(s.string(), /^example/g), }); const testQuery = { url: "example", }; console.log(s.is(testQuery, Query), s.is(testQuery, Query));
It returns the following output:
% node index.js true false
I would expect each call to is to return the same output. I suspect this is because of the stateful behaviour of regular expressions.
is
The text was updated successfully, but these errors were encountered:
No branches or pull requests
In this example:
It returns the following output:
I would expect each call to
is
to return the same output. I suspect this is because of the stateful behaviour of regular expressions.The text was updated successfully, but these errors were encountered: