Skip to content

Releases: RHieger/regex-zip-code-tutorial

v2.2

25 May 14:39

Choose a tag to compare

This minor maintenance release refactors createParagraphs() to use the forEach() method, thus improving consistency in code.

v2.1.50

25 May 03:15

Choose a tag to compare

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.

  1. A duplicate function call to the createParagraphs() helper function.
  2. A misplaced function call to the createParagraphs() helper function.

Fixing these two factors resolved the issue.

v2.1.12

21 May 21:39

Choose a tag to compare

This minor maintenance release corrects a small typographical error in code documentation.

v2.1.1

20 May 02:14

Choose a tag to compare

This maintenance release cleans up inconsistency and awkwardness of code documentation which will facilitate better maintenance and future releases, if any.

v2.1

18 May 02:28
18d7808

Choose a tag to compare

This release resolved an issue submitted on May 16, 2022 related to a bug that caused the createParagraphs() helper function to push duplicate <p> tag nodes as children to resultBox.

v2.0

15 May 00:43

Choose a tag to compare

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

14 May 15:23

Choose a tag to compare

Corrected minor bug: missing const keyword before createParagraphText() function.

v1.50

13 May 23:08

Choose a tag to compare

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

12 May 11:58

Choose a tag to compare

This release optimizes code by moving declaration of a critical constant before the code that uses it.

v1.10

08 May 22:09

Choose a tag to compare

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:

  1. 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.
  2. 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.