Merged
Conversation
AdriVanHoudt
reviewed
Jun 1, 2017
API.md
Outdated
| - `replacer` - the replacer function or array. Defaults to no action. | ||
| - `space` - number of spaces to indent nested object keys. Defaults to no indentation. | ||
| - `suffix` - string suffix added after conversion to JSON string. Defaults to no suffix. | ||
| - `escape` - calls [`Hoek.jsonEscape`](https://github.com/hapijs/hoek/blob/master/API.md#escapejsonstring) after conversion to JSON string. Defaults to not escaping. |
Contributor
There was a problem hiding this comment.
I would go with "defaults to false."
package.json
Outdated
| "cryptiles": "3.x.x", | ||
| "heavy": "4.x.x", | ||
| "hoek": "4.x.x", | ||
| "hoek": "git+https://git@github.com/hapijs/hoek.git", |
Contributor
There was a problem hiding this comment.
This should be a legit version, maybe ask @nlf to do a release of hoek?
| }); | ||
| }); | ||
|
|
||
| describe('escape()', () => { |
Contributor
There was a problem hiding this comment.
Add a test with a success case as well for .escape()
Contributor
|
Also CI is failing since, I think, hapi uses a shrinkwrap that causes it to install hoek@4 and not the latest version you told it to in the package.json. A new version of hoek would solve this. |
Contributor
|
@g-k you still have some open comments above (beside the missing hoek version). |
|
This thread has been automatically locked due to inactivity. Please open a new issue for related bugs or questions following the new issue template instructions. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
refs: hapijs/hoek#204
Adds the
json.escapeoption to callhoek.escapeJSONon the JSON output. It's disabled by default.There's probably a better place and name for this option.