Skip to content

Commit

Permalink
Feedback round 1
Browse files Browse the repository at this point in the history
* Rename parameter from "json" to "s"
* Lowecase "Type"
* Proper JSON without the spaces
  • Loading branch information
Avaq committed Mar 24, 2016
1 parent 0c2b24a commit d61b9c3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2764,7 +2764,7 @@
def('parseJson',
{},
[TypeRep, $.String, $Maybe(a)],
function(type, json) { return filter(is(type), encase(JSON.parse, json)); });
function(type, s) { return filter(is(type), encase(JSON.parse, s)); });

//. ### RegExp

Expand Down
4 changes: 2 additions & 2 deletions test/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -4149,8 +4149,8 @@ describe('parse', function() {
eq(S.parseJson(Object, '[Invalid JSON]'), S.Nothing());
});

it('returns a Nothing when the parsed result is not a member of the given Type', function() {
eq(S.parseJson(Array, '{"foo": "bar"}'), S.Nothing());
it('returns a Nothing when the parsed result is not a member of the given type', function() {
eq(S.parseJson(Array, '{"foo":"bar"}'), S.Nothing());
});

});
Expand Down

0 comments on commit d61b9c3

Please sign in to comment.