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.
- 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.
To install and use the module locally, follow these steps:
- Clone the repository:
git clone git@github.com:clementvial/links-status.git
cd links-status
- Install dependencies::
npm install
- Build the project::
npm run build
After building the project, you can run the module:
npm start <path-to-your-file>
Example:
npm start example.html
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
This project is licensed under the MIT License. See the LICENSE file for details.