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

@oriananohemi/md-links

v1.7.0

Published

Proyecto Libreria de Node, Laboratoria

Downloads

15

Readme

MD-links Instrucciones

Libreria que permite extraer todos los enlaces dentro de un archivo de tipo Markdown, identificar cuales son los codigos de respuesta de las consultas, realizar estadisticas: cuantos enlaces estan rotos, cuales son unicos, cuantos hay en total

Instalar CLI

Uso CLI

Recibe como argumento un archivo ".md" o una carpeta que contenga un archivo ".md".

Al ejecutar el comando, te imprime un arreglo de objetos con las url, la referencia dada al enlace, el archivo donde se encontro el enlace

   {
     href: 'http://algo.com/2/3/',
     text: 'Link a algo',
     file: './some/example.md'
   },
   {
     href: 'http://google.com/',
     text: 'Google',
     file: './some/example.md'
   }
   {
     href: 'https://nodejs.dev/',
     text: 'Node JS',
     file: './some/example.md'
   }

Si ejecutas el comando con la bandera --validate, verifica el status de los links

   {
     href: 'http://algo.com/2/3/',
     text: 'Link a algo',
     file: './some/example.md',
     status: 404,
     value: 'FAIL'
   },
   {
     href: 'http://google.com/',
     text: 'Google',
     file: './some/example.md',
     status: 200,
     value: 'OK'
   }
   {
     href: 'https://nodejs.dev/',
     text: 'Node JS',
     file: './some/example.md',
     status: 200,
     value: 'OK'
   }

Si ejecutas el comando con la bandera --stats, te muestra cuantos enlaces hay en total y cuantos son unicos

 Total: 3,
 Unique: 3

Si ejecutas el comando con la bandera --validate --stats, verifica el status de los links y te imprime cuantos enlaces hay en total, cuantos son unicos y cuantos estan rotos

 Total: 3,
 Unique: 3,
 Broken: 1

Instalar como Modulo

Uso del Modulo

Devuelve un arreglo de objetos con las url, la referencia dada al enlace, el archivo donde se encontro el enlace

mdlinks('./README.md')
  .then((res) => {
    console.log(res);
  })

Devuelve un arreglo de objetos con las url, la referencia dada al enlace, el archivo donde se encontro el enlace y verifica cada uno de los links, imprimiendo tambien el codigo de la respuesta

mdlinks('./README.md', { validate: true})
  .then((res) => {
    console.log(res);
  })

Devuelve las estadisticas de los enlaces encontrados en el archivo, cuantos hay en total y cuantos son unicos

mdlinks('./README.md', { stats: true})
  .then((res) => {
    console.log(res);
  })

Devuelve las estadisticas de los enlaces encontrados en el archivo, cuantos hay en total, cuantos son unicos y cuales estan rotos

mdlinks('./README.md', { validate: true, stats: true})
  .then((res) => {
    console.log(res);
  })