BrasilAPI / BrasilAPI/cep-promise
[docs] Adicionar documentação a nível de código
- Dominant language
- JavaScript
- Stars
- 3k
- Forks
- 317
- PR merge metrics
- No merged PRs in 30d
Description
Documentar o código é indispensável para qualquer projeto com muitas pessoas trabalhando e principalmente em projetos open source, pois além de facilitar as manutenções (PR's), diminui o tempo de aprendizado.
Sugiro a utilização do padrão [JSDoc](https://jsdoc.app/), segue exemplo:
```javascript
/**
* Represents a book.
* @constructor
* @param {string} title - The title of the book.
* @param {string} author - The author of the book.
*/
function Book(title, author) {
}
/**
* Returns the sum of a and b
* @param {number} a
* @param {number} b
* @returns {Promise} Promise object represents the sum of a and b
*/
function sumAsync(a, b) {
return new Promise(function(resolve, reject) {
resolve(a + b);
});
}
Contributor guide
Assessment
This issue has not been assessed yet.