This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * Password validation RegEx for JavaScript | |
| * | |
| * Passwords must be | |
| * - At least 8 characters long, max length anything | |
| * - Include at least 1 lowercase letter | |
| * - 1 capital letter | |
| * - 1 number | |
| * - 1 special character => !@#$%^&* | |
| * |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const manipulator = new DOMManipulator(); | |
| // Create a new div element with an ID of "myDiv", a class of "myClass", and some content | |
| const myDiv = manipulator.createElement('div', 'myDiv', 'myClass', 'Hello, world!', { | |
| 'data-id': 123, | |
| 'data-name': 'John Doe' | |
| }); | |
| // Modify the div element to update its class and content, and add a new attribute | |
| manipulator.modifyElement(myDiv, null, 'myOtherClass', 'Hello, world! How are you?', { |
OlderNewer