-
Notifications
You must be signed in to change notification settings - Fork 43
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
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this 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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Comentarios más formales
## Haciendo pruebas de mdlinks | |
## Haciendo pruebas de mdlinks |
|
||
## Preámbulo | ||
![link]("link") | ||
|
There was a problem hiding this comment.
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.
const fs = require('fs') | ||
const fetch = require('node-fetch') | ||
const colors = require('colors') |
There was a problem hiding this comment.
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.
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') |
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 | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
mejorar la definición
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 | |
} |
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); | ||
} |
There was a problem hiding this comment.
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
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); | |
} |
if (shouldShowTotals > -1) { | ||
// contar | ||
// muestro results | ||
} |
There was a problem hiding this comment.
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
if (shouldShowTotals > -1) { | |
// contar | |
// muestro results | |
} | |
{ | ||
"name": "mdlinks", | ||
"version": "1.0.0", | ||
"description": "Proyecto mdlinks de Laboratoria", |
There was a problem hiding this comment.
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
"description": "Proyecto mdlinks de Laboratoria", | |
"description": "Proyecto mdlinks de Laboratoria", |
"mdlinks":"cli.js" | ||
}, | ||
"scripts": { | ||
"test": "echo \"Error: no test specified\" && exit 1" |
There was a problem hiding this comment.
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
"test": "echo \"Error: no test specified\" && exit 1" | |
"test": "jest" |
"scripts": { | ||
"test": "echo \"Error: no test specified\" && exit 1" | ||
}, | ||
"author": "Natalia Olmos", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Falta tu repositorio
"markdown-it": "^11.0.0", | ||
"marked": "^1.1.0", |
There was a problem hiding this comment.
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
"markdown-it": "^11.0.0", | |
"marked": "^1.1.0", |
No description provided.