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.
Based on #10, this goes on to refactor the internal data format and separates the data into
data.json
and the output functions intoindex.js
. All external interfaces are kept unmodified.The previous data format was:
And the updated data format is:
In terms of file size, using an object with string keys rather than an array actually has almost no effect on gzipped output size, as the common strings get compacted. Legibility is significantly increased, and some of the previous possibilities for errors (namely, missing priority order) are eliminated.
As an additional feature, the data itself is now exposed separately, which allows its use even outside JS environments.