Skip to content

feat(json-beautifier): allow single quote around values#24

Merged
martindrapeau merged 2 commits intoFlatFilers:masterfrom
hisabimbola:master
Oct 8, 2017
Merged

feat(json-beautifier): allow single quote around values#24
martindrapeau merged 2 commits intoFlatFilers:masterfrom
hisabimbola:master

Conversation

@hisabimbola
Copy link
Contributor

This PR allows the user to select whether to allow single quote or double quote around values

fixes #23

This commit allows the user to select whether to allow single quote or double quote around values

FlatFilers#23
@@ -75,11 +75,12 @@
dropQuotesOnNumbers = options.dropQuotesOnNumbers || false,
inlineShortArrays = options.inlineShortArrays || false,
inlineShortArraysDepth = options.inlineShortArraysDepth || 1;
Copy link
Collaborator

@martindrapeau martindrapeau Oct 7, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Semicolon and comma.

inlineShortArraysDepth = options.inlineShortArraysDepth || 1,
quoteType = options.quoteType || 'double';

<label class="inline" title="Quote type around values">
Quotes
<select id="quote-type" name="quote-type" class="save">
<option value="single">Single Quote</option>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Simply use Single and Double for the option text - shorter.

@martindrapeau
Copy link
Collaborator

I tested it works nicely. Two small tweaks to make then I will merge your PR. Good job!

@hisabimbola
Copy link
Contributor Author

Thanks for your review @martindrapeau

Update the code.

@martindrapeau martindrapeau merged commit d2257d3 into FlatFilers:master Oct 8, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support single or double quote around the properties

2 participants