Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

6 phone number changed with documentation #7

Merged
merged 4 commits into from
Jul 24, 2023

Conversation

roman1923
Copy link
Contributor

No description provided.

@roman1923 roman1923 self-assigned this May 19, 2023
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't need to create documentation inside .txt file, we should add description to each function, split on logical parts code, add description at the top of the file in the .js file.
Example from ChatGPT:

/**
 * Documentary.js
 *
 * A JavaScript documentary file that provides an example of documenting code using JSDoc style.
 */

/**
 * Represents a documentary object.
 * @class
 */
class Documentary {
  /**
   * Create a new Documentary.
   * @constructor
   * @param {string} title - The title of the documentary.
   * @param {string} director - The director of the documentary.
   * @param {number} year - The year the documentary was released.
   */
  constructor(title, director, year) {
    this.title = title;
    this.director = director;
    this.year = year;
  }

  /**
   * Get the title of the documentary.
   * @returns {string} The title of the documentary.
   */
  getTitle() {
    return this.title;
  }

  /**
   * Get the director of the documentary.
   * @returns {string} The director of the documentary.
   */
  getDirector() {
    return this.director;
  }

  /**
   * Get the year the documentary was released.
   * @returns {number} The year the documentary was released.
   */
  getYear() {
    return this.year;
  }
}

// Example usage

// Create a new documentary object
const documentary = new Documentary("The Civil War", "Ken Burns", 1990);

// Get the title of the documentary
const title = documentary.getTitle();
console.log(`Title: ${title}`);

// Get the director of the documentary
const director = documentary.getDirector();
console.log(`Director: ${director}`);

// Get the year the documentary was released
const year = documentary.getYear();
console.log(`Year: ${year}`);

@@ -25,70 +25,86 @@ const codesISO2European = ['al', 'ad', 'at', 'by', 'be', 'ba', 'bg', 'hr', 'cz',
'li', 'lt', 'lu', 'mk', 'mt', 'md', 'mc', 'me', 'nl', 'no', 'pl', 'pt', 'ro',
'ru', 'sm', 'rs', 'sk', 'si', 'es', 'se', 'ch', 'ua', 'gb']

function submitFormInitialize($parentElement) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Function name is bad. Let's use initIntlTelInput, so it is more clean and easy to understand what this function does

@yaroslav-borodii yaroslav-borodii changed the base branch from main to v1.2.0 May 23, 2023 10:42
- Add JavaScript Standard
- Add package-lock.json to .gitignore
- Remove dependency to jQuery for Frontend part
- Move JavaScript files to footer
@yaroslav-borodii
Copy link
Collaborator

Update

  • Add JavaScript Standard
  • Add package-lock.json to .gitignore
  • Remove dependency to jQuery for Frontend part
  • Move JavaScript files to footer

@yaroslav-borodii yaroslav-borodii merged commit 525ab33 into v1.2.0 Jul 24, 2023
@yaroslav-borodii yaroslav-borodii deleted the 6-phone-number-changed-with-documentation branch July 24, 2023 08:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants