Remove trailing commas in objects #28
Closed
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.
For ES3 compatibility and to support IE7, remove trailing commas from
each object in
replacementList.We find this module very useful (thanks!) and are starting to use it as a dependency in more and more of our frontend modules. However, we have a legacy JS build process (which we're trying to phase out) that ultimately uses the closure compiler in ES3 mode, which cannot parse trailing commas.
I appreciate that you may not wish to accept this PR, since IE7 and ES3 may not be a main concern, but I think it'd be wonderful to make this module more accessible to "edge case" users like us - PRs like #25 would also help. Perhaps a better way to achieve this is to pass the code through something like babel, but the tradeoff is extra code and a build step for this module.