-
Notifications
You must be signed in to change notification settings - Fork 103
New issue
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
Add null
to json
#201
Add null
to json
#201
Conversation
lib/json.js
Outdated
@@ -11,13 +11,22 @@ var shrink = require("./shrink.js"); | |||
var string = require("./string.js"); | |||
var utils = require("./utils.js"); | |||
|
|||
var nulll = primitive.constant(null); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wasn't sure if this is better than e.g.
var nulll = arbitraryBless({
generator: generator.constant(null),
shrink: shrink.noop,
show: show.def,
});
Also, suggestions for a better name than nulll
welcome 😅
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
null_constant
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nullArb
.
@StoneCypher I don't use snake_case
in the code.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i was joking
b074217
to
f10c23d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nulll
-> nullArb
Resolves jsverify#170.
thanks |
Resolves #170.