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

Natalia Olmos PR MDLINKS #29

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open

Natalia Olmos PR MDLINKS #29

wants to merge 4 commits into from

Conversation

NataliaOlmos
Copy link

No description provided.

Copy link

@reloadercf reloadercf left a comment

Choose a reason for hiding this comment

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

Me gusta que tu proyecto resuelve el problema planteado, te recomiendo mejorar la definición de tus variables recuerda que tu código seria leído por algún reclutador que consulte tu portafolio de trabajo, otro aspecto a mejorar y tener cuidado con la lógica planteada en algunas funciones porque me percate que tu código se puede refactorizar y simplificar, algo que sin duda destaco es el correcto uso de variables.

@@ -1,245 +1,27 @@
# Markdown Links
# Hola
## Haciendo pruebas de mdlinks

Choose a reason for hiding this comment

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

Comentarios más formales

Suggested change
## Haciendo pruebas de mdlinks
## Haciendo pruebas de mdlinks


## Preámbulo
![link]("link")

Choose a reason for hiding this comment

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

Complementa tu README con recursos para el usuario, (capturas de pantalla o videos) sobre la instalación y alguna documentación referente a tu librería.

Comment on lines +1 to +3
const fs = require('fs')
const fetch = require('node-fetch')
const colors = require('colors')

Choose a reason for hiding this comment

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

Esta cool el uso de const para variables que no mutan su valor.

Suggested change
const fs = require('fs')
const fetch = require('node-fetch')
const colors = require('colors')
const fs = require('fs')
const fetch = require('node-fetch')
const colors = require('colors')

Comment on lines +7 to +14
function getContentString() {

let index = process.argv.indexOf("--file")
if (index < 0) return console.log("You need to use a valid uri flag --file")
let uri = process.argv[index + 1]
let string = fs.readFileSync(uri, 'utf8')
return string
}

Choose a reason for hiding this comment

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

mejorar la definición

Suggested change
function getContentString() {
let index = process.argv.indexOf("--file")
if (index < 0) return console.log("You need to use a valid uri flag --file")
let uri = process.argv[index + 1]
let string = fs.readFileSync(uri, 'utf8')
return string
}
function getContentPath() {
let index = process.argv.indexOf("--file")
if (index < 0) return console.log("You need to use a valid uri flag --file")
let path = process.argv[index + 1]
let file = fs.readFileSync(uri, 'utf8')
return file
}

Comment on lines +16 to +21
function getLinks(string) {

const getArray = ("Text: ", string.toString());
let regExpression = /(http(s)?:\/\/.)?(www\.)?[-a-zA-Z0-9@:%._\+~#=]{2,256}\.[a-z]{2,6}\b([-a-zA-Z0-9@:%_\+.~#?&//=]*)/g;
return getArray.match(regExpression);
}

Choose a reason for hiding this comment

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

Definir mejor los parámetros recibidos

Suggested change
function getLinks(string) {
const getArray = ("Text: ", string.toString());
let regExpression = /(http(s)?:\/\/.)?(www\.)?[-a-zA-Z0-9@:%._\+~#=]{2,256}\.[a-z]{2,6}\b([-a-zA-Z0-9@:%_\+.~#?&//=]*)/g;
return getArray.match(regExpression);
}
function getLinks(file) {
const getArrayLinks = ("Text: ", string.toString());
let regExpression = /(http(s)?:\/\/.)?(www\.)?[-a-zA-Z0-9@:%._\+~#=]{2,256}\.[a-z]{2,6}\b([-a-zA-Z0-9@:%_\+.~#?&//=]*)/g;
return getArrayLinks.match(regExpression);
}

Comment on lines +70 to +73
if (shouldShowTotals > -1) {
// contar
// muestro results
}

Choose a reason for hiding this comment

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

Tener un if vacío con comentario no es la mejor practica

Suggested change
if (shouldShowTotals > -1) {
// contar
// muestro results
}

{
"name": "mdlinks",
"version": "1.0.0",
"description": "Proyecto mdlinks de Laboratoria",

Choose a reason for hiding this comment

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

Mejorar la descripción en ingles

Suggested change
"description": "Proyecto mdlinks de Laboratoria",
"description": "Proyecto mdlinks de Laboratoria",

"mdlinks":"cli.js"
},
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"

Choose a reason for hiding this comment

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

recuerda que el apartado de los scripts se utiliza para ejecutar los comandos útiles en el desarrollo de la librería

Suggested change
"test": "echo \"Error: no test specified\" && exit 1"
"test": "jest"

"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "Natalia Olmos",

Choose a reason for hiding this comment

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

Falta tu repositorio

Comment on lines +19 to +20
"markdown-it": "^11.0.0",
"marked": "^1.1.0",

Choose a reason for hiding this comment

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

Borra de package.json lo que no utilizas

Suggested change
"markdown-it": "^11.0.0",
"marked": "^1.1.0",

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