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

@ayauri29/md-links

v1.0.4

Published

Validate links of Markdown

Downloads

4

Readme

ayauri29@mdlinks

Build Status Coverage Status npm dependents

Md-links es una librería que brinda estadísticas sobre los links que se encuentren dentro de todos los archivos .md de una ruta dada.

Guía de uso e instalación de la librería

Instalación

Instale ayauri29@mdlinks desde npm.

npm i @ayauri29/md-links

Uso

API mdLinks(path, opts)

La función tiene 2 parámetros:

  • Path: Ruta absoluta o relativa al archivo o directorio.
  • Opts: Un objeto con las siguientes propiedades:
    • validate: Booleano que determina si se desea validar los links encontrados.

El valor de retorno es una promesa (Promise) que resuelve un arreglo de objetos, donde cada objeto representa un link y contiene las siguientes propiedades:

  • href: URL encontrada.
  • text: Texto que aparecía dentro del link (<a>).
  • file: Ruta del archivo donde se encontró el link.
Ejemplo

Importe ayauri29@mdlinks desde su proyecto.

const fn = require('ayauri29@mdlinks');

Para validación de los links:

mdLinks.mdLinks('src', {validate: true}).then((data) => console.log(data));

image

Para validate false:

const mdLinks = require('@ayauri29/md-links');
mdLinks.mdLinks('src', {validate: false}).then((data) => console.log(data));

image

CLI

Uso de comandos
md-links <path-to-file> [options]
  • El ejecutable implementa --validate.

image

  • El ejecutable implementa --stats.
  • El ejecutable implementa --validate y --stats juntos.
  • El ejecutable no implementa ninguna opción.
  • Para ayuda puede ejecutar el comando md-links --help

Objetivos de aprendizaje

Objetivos de aprendizaje pendientes
  • [x] Uso de callbacks
Javascript
  • [x] Consumo de Promesas
  • [x] Creacion de Promesas
  • [x] Modulos de Js
  • [x] Recursión

Node

  • [x] Sistema de archivos
  • [x] package.json
  • [x] crear modules
  • [x] Instalar y usar modules
  • [x] npm scripts
  • [x] CLI (Command Line Interface - Interfaz de Línea de Comando)

Testing

  • [x] Testeo de tus funciones
  • [x] Testeo asíncrono
  • [x] Uso de librerias de Mock
  • [x] Mocks manuales
  • [x] Testeo para multiples Sistemas Operativos

Git y Github

  • [x] Organización en Github

Buenas prácticas de desarrollo

  • [ ] Modularización
  • [ ] Nomenclatura / Semántica
  • [ ] Linting

Referencias