npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

md-links-jossf

v1.0.0

Published

Analiza archivos markdown para comprobar los links que funcionan y no correctamente

Downloads

4

Readme

⚒️ Markdown Links

1. Introducción

MD-Links Es una librería que permite validar URL dentro de archivos Markdown(.md), esta librería nos permitirá obtener los estados de los enlaces tales como enlaces totales, únicos y enlaces rotos.

md-links

2.instrucciones de uso 🛠️

Las siguientes instrucciones le permitirán instalar la biblioteca en su computadora para el desarrollo.

2.1 Instalación 🧰

La instalación se puede realizar por npm:

$ npm i md-links-jossf

2.2 Interfaz de Linea de Comando (CLI) ⚙️

Se ejecuta de la siguiente manera a través del terminal:

$ md-links <path> [options]

Ejemplo:

$ md-links carpeta_de_prueba
href: https://www.geeksforgeeks.org/how-to-run-node-js-program-as-an-executable/
text: a link
file: C:\Users\Joss\Documents\GitHub\LIM017-md-links\exampleFile

2.2.1 Opciones ⚗️

  • --validate

Al pasar la opción --validate, el módulo hará una petición HTTP para averiguar si el link funciona o no; si el link resulta en una redirección a una URL que responde "ok" se considerara una URL valida, en caso de que un links no se redireccione a una URL considerara que el links esta roto por lo tanto devolverá como mensaje "fail".

Ejemplo:

$ md-Links ./exampleFile --validate
 href: https://www.youtube.com/watch?v=RqQ1d1qEWlE
 text: Curso para principiantes de Java Script
 file: C:\\Users\\Joss\\Documents\\GitHub\\LIM017-md-links\\exampleFile\\folder.md
 status: 200
 ok: OK
href: https://nodej.org/api/fs.html#fs_fs_readfile_options_callback
text: Broken
file: C:\Users\Joss\Documents\GitHub\LIM017-md-links\exampleFile\README.md
status: Fail: Your request failed
ok: fail

Los valores de retorno son:

  • href: URL encontrada.

  • text: Texto que aparecía dentro del link.

  • file: Ruta del archivo donde se encontró el link.

  • status: Código de respuesta HTTP.

  • ok: Mensaje fail en caso de fallo u ok en caso de éxito.

  • --stats

Si pasamos la opción --stats nos retornara las estadisticas (total de los links y los links únicos) de las carpetas u archivos ingresados.

Ejemplo:

$ md-Links ./exampleFile --stats

Total: 12
Unique: 4

Los valores de retorno son:

  • Total: total de links encontrados en archivos Markdown.

  • Unique: total de links únicos.

  • --validate --stats o --stats --validate

También podemos combinar --stats y --validate nos retornará las estadísticas (total de links, links únicos y links rotos ) de la carpeta u archivo ingresado.

Ejemplo:

$ md-links exampleFile --validate --stats
Total: 12
Unique: 4
Broken: 3

Los valores de retorno son:

  • Total: total de links encontrados en archivos Markdown.
  • Unique: total de links únicos.
  • Broken: total de links rotos.

3. Proceso de desarrollo:

Diagrama de flujo API Diagrama de flujo API Diagrama de flujo CLI Diagrama de flujo CLI

4. Liberías empleadas 📚

Author ✒️

Joseline Franco Herrera