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 🙏

© 2025 – Pkg Stats / Ryan Hefner

@carolgmonteiro/md-links

v1.0.0

Published

Software that analizes links from markdown files

Readme

Md-Links | Libreria para extraer links de archivos Markdown

Markdown es un lenguaje de marcado ligero muy popular entre developers. Es usado en muchas plataformas que manejan texto plano (GitHub, foros, blogs, ...), y es muy común encontrar varios archivos en ese formato en cualquier tipo de repositorio (empezando por el tradicional README.md).

Estos archivos Markdown normalmente contienen links (vínculos/ligas) que muchas veces están rotos o ya no son válidos y eso perjudica mucho el valor de la información que se quiere compartir.

La libreria, que está en el idioma inglés, fue creada usando Node.js, e su función es leer y analizar archivos en formato Markdown desde el input de un unico archivo hasta un directorio. Extrae links de los archivos y los verifica el status de los links y saca estadísticas cómo total de links, links que no funcionan y unicos.

Guía de Uso e Instalación

Instalación

const mdLinks = require("cgm-md-links");

Con el comando npm install cgm-md-links podemos instalar directamente. Ver docs oficiales de npm install acá.

npm install cgm-md-links

Como usar

En el archivo JS:

const mdlinks = require("cgm-md-links");

Cómo llamar a libreria desde la terminal:

  • Para path-to-file igual a un Directorio
md-links <"path-to-directory"> [options]
  • Para path-to-file igual a un archivo
md-links <"path-to-file"> [options]

CLI (Command Line Interface)

La libreria hace las seguientes entregas:

1. El usuario no elije ninguna opción y recibe los links extraiedos de los archivos analizados

2. Elije las opciones disponibles:

  • stats (dados estadisticos de los links)
  • validate (status de los links en la red)
  • stats validate (dados estadisticos del status de los links)

PATH

  • Leer archivos con extensión .md

md-links <file.md>

  • Leer un directorio

md-links <"path-to-directory">

En ambos casos, se obtiene como resultado:

  • file: archivo o ruta donde fue encontrado el link.
  • text: descripción del link.
  • href: link encontrado.

OPTIONS

--validate

Entrega la validacion o status de los links (status: 200, 300, 404, 500 etc).

Usar así md-links <"path-to-file"> --stats

--stats

Entrega las seguientes estadísticas de los links: Total - el total de links encontrados; Unique - el total de links unicos.

Usar así md-links <"path-to-directory"> --stats --validate md-links <"path-to-file"> --stats --stats | --s

--stats --validate

Entrega las seguientes estadísticas de los links: Total - el total de links encontrados; Unique - el total de links unicos. Broken - el total de links rotos;

Usar así md-links <"path-to-directory"> --stats --validate md-links <"path-to-file"> --stats --validate --stats --validate | --validate --stats | --s --v | --v --s


Documentación técnica

Dependencias:

  • node.js versión 11
  • "chalk": "^2.4.2"
  • "fetch": "^1.1.0"
  • "filehound": "^1.17.3"
  • "marked": "^0.7.0",
  • "node-fetch": "^2.6.0"
  • "eslint": "^6.2.1",
  • "eslint-plugin-jest": "^22.15.2",
  • "jest": "^24.9.0"

Planificación:

Diagrama de Flujo

Trello

El board con el backlog de la implementación de la librería puede ser encontrado aquí.

Milestones del proyecto

El proyecto fue ordenado en milestones en trello, recorriendo cada parte del diagrama de flujo


Autora

Carolina Guido Monteiro Desarrolladora Front-end