Add `null` to `json` #201

Merged
merged 1 commit into from Mar 8, 2017

Conversation

Projects
None yet
3 participants
@apalm
Contributor

apalm commented Mar 7, 2017

Resolves #170.

lib/json.js
@@ -11,13 +11,22 @@ var shrink = require("./shrink.js");
var string = require("./string.js");
var utils = require("./utils.js");
+var nulll = primitive.constant(null);

This comment has been minimized.

@apalm

apalm Mar 7, 2017

Contributor

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 😅

@apalm

apalm Mar 7, 2017

Contributor

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 😅

This comment has been minimized.

@StoneCypher

StoneCypher Mar 8, 2017

Contributor

null_constant

@StoneCypher

StoneCypher Mar 8, 2017

Contributor

null_constant

This comment has been minimized.

@phadej

phadej Mar 8, 2017

Member

nullArb.

@StoneCypher I don't use snake_case in the code.

@phadej

phadej Mar 8, 2017

Member

nullArb.

@StoneCypher I don't use snake_case in the code.

This comment has been minimized.

@StoneCypher

StoneCypher Mar 8, 2017

Contributor

i was joking

@StoneCypher

StoneCypher Mar 8, 2017

Contributor

i was joking

@phadej

nulll -> nullArb

@phadej phadej merged commit b363b07 into jsverify:master Mar 8, 2017

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
@phadej

This comment has been minimized.

Show comment
Hide comment
@phadej

phadej Mar 8, 2017

Member

thanks

Member

phadej commented Mar 8, 2017

thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment