Skip to content

A Node.js library that parses files, extracts URLs, and checks their HTTP status codes. πŸ“œπŸ”—πŸ” Ideal for developers and content creators, it ensures link validity effortlessly.

License

Notifications You must be signed in to change notification settings

diesmedia/links-status

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

8 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Links Status

Links Status is a lightweight and efficient Node.js module written in TypeScript that parses files to find all http and https links, checks their statuses, and outputs the HTTP response codes. This tool is perfect for validating links in various file types, such as HTML, Markdown, JavaScript, and TypeScript, ensuring all your links are working correctly.

Features

  • Multi-format Support: Extract links from HTML, Markdown, JavaScript, and TypeScript files.
  • HTTP Status Check: Verify the status of each link and capture HTTP response codes.
  • Easy to Use: Simple and straightforward command-line interface.

Installation

To install and use the module locally, follow these steps:

  1. Clone the repository:
git clone git@github.com:clementvial/links-status.git
cd links-status
  1. Install dependencies::
npm install
  1. Build the project::
npm run build

Usage

After building the project, you can run the module:

npm start <path-to-your-file>

Example:

npm start example.html

Output

The tool outputs the HTTP status codes for each link found in the specified file:

--- RESULTS ---
500 - https://error.com
404 - https://notfound.com
200 - http://example.com

License

This project is licensed under the MIT License. See the LICENSE file for details.

About

A Node.js library that parses files, extracts URLs, and checks their HTTP status codes. πŸ“œπŸ”—πŸ” Ideal for developers and content creators, it ensures link validity effortlessly.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published