Releases: RHieger/regex-zip-code-tutorial
v2.2
v2.1.50
This maintenance release resolves a bug that prevents the Validate Zip Codes button from populating the Result Box, as it should.
Though the cause was not identified with certainty, it seems that two factors were causing the bug.
- A duplicate function call to the
createParagraphs()helper function. - A misplaced function call to the
createParagraphs()helper function.
Fixing these two factors resolved the issue.
v2.1.12
v2.1.1
v2.1
v2.0
This release refactors both the populateResultBox() and depopulateResultBox() callback functions to correct the use of erroneous DOM node identifiers in code that manipulates the DOM for index.html.
The identifier of results was used to identify the node that captures <div id="results">. As is plain to see, results is the id of the <div> being captured in the DOM. Though this does work because JavaScript recognizes the id, it is more semantically correct to refer to the captured node.
The refactoring in v2.0 corrects these errors.
v1.50.1
v1.50
This is a major feature upgrade release in which some code inefficiency has been addressed.
In an effort to adhere to DRY principles, the createParagraph() helper function has been renamed to createParagraphs() and now creates all the paragraphs necessary for each match returned by the regex engine.
Additionally, the ungainly paragraphText[] array that called the old createParagraph() helper function repeatedly, duplicating code by making reference to the index in the matches[] array, has been refactored as an empty array.
A new paragraphs[] array has been added and is populated using the new createParagraphs() helper function.
Finally, the populateResultBox() callback function has been refactored to take advantage of the above helper functions.
v1.15
v1.10
This release corrects an inconsistency in behavior between the matches provided by the app.js JavaScript and the results provided by Regexpal.com, which was used as a benchmark for this mini-web application.
Changes Made:
- Removed extra spaces in the JavaScript template literal that defines the testString constant. These spaces inexplicably caused the regular expression object to function properly and validate matches, but produced inconsistent results on Regexpal.com. Therefore all extra spaces were removed.
- Refactored regular expression object to make it more explicit. Specifically the
^and$anchors were used to clearly delineate the beginning and end of a substring match found in testString.
These two steps made results consistent between the online testing platform and the JavaScript code in this application.