All Projects → transitive-bullshit → Check Links

transitive-bullshit / Check Links

Robustly checks an array of URLs for liveness. Extremely fast ⚡

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Check Links

scrupulous
Simple inline form validation using HTML5 attributes that plays nicely with Bootstrap
Stars: ✭ 12 (-96%)
Mutual labels:  validation
Valiktor
Valiktor is a type-safe, powerful and extensible fluent DSL to validate objects in Kotlin
Stars: ✭ 267 (-11%)
Mutual labels:  validation
Structure
A simple schema/attributes library built on top of modern JavaScript
Stars: ✭ 292 (-2.67%)
Mutual labels:  validation
Email inquire
Validate email for common typos and one-time email providers
Stars: ✭ 257 (-14.33%)
Mutual labels:  validation
Vscode Stylelint
A Visual Studio Code extension to lint CSS/SCSS/Less with stylelint
Stars: ✭ 260 (-13.33%)
Mutual labels:  validation
Forms
📝 Generating, validating and processing secure forms in PHP. Handy API, fully customizable, server & client side validation and mature design.
Stars: ✭ 272 (-9.33%)
Mutual labels:  validation
ngx-linkifyjs
Angular V8 wrapper for linkifyjs - library for finding links in plain text and converting them to HTML <a> tags via linkifyjs
Stars: ✭ 40 (-86.67%)
Mutual labels:  links
Validate
A simple jQuery plugin to validate forms.
Stars: ✭ 298 (-0.67%)
Mutual labels:  validation
Validate
Professional data validation for the R environment
Stars: ✭ 268 (-10.67%)
Mutual labels:  validation
Pycrumbs
Bits and bytes of Python from the Internet
Stars: ✭ 3,071 (+923.67%)
Mutual labels:  links
Creditcard.js
A simple credit cards validation library in JavaScript
Stars: ✭ 259 (-13.67%)
Mutual labels:  validation
Gamedevelopmentlinks
This is a collection of useful game-development links including, but not restricted to, development with MonoGame.
Stars: ✭ 257 (-14.33%)
Mutual labels:  links
Awesome Cuda
This is a list of useful libraries and resources for CUDA development.
Stars: ✭ 274 (-8.67%)
Mutual labels:  links
Pt Br Validator
Uma biblioteca contendo validações de formatos Brasileiros, para o Laravel
Stars: ✭ 255 (-15%)
Mutual labels:  validation
Hamsters
A mini Scala utility library
Stars: ✭ 292 (-2.67%)
Mutual labels:  validation
bear
Add to each Bear note a back-reference to notes that are citing it.
Stars: ✭ 28 (-90.67%)
Mutual labels:  links
Fluentresults
A generalised Result object implementation for .NET/C#
Stars: ✭ 266 (-11.33%)
Mutual labels:  validation
Konform
Portable validations for Kotlin
Stars: ✭ 298 (-0.67%)
Mutual labels:  validation
Ow
Function argument validation for humans
Stars: ✭ 3,415 (+1038.33%)
Mutual labels:  validation
Laravel Postal Code Validation
Worldwide postal code validation for Laravel and Lumen
Stars: ✭ 278 (-7.33%)
Mutual labels:  validation

check-links

Robustly checks an array of URLs for liveness.

NPM Build Status JavaScript Style Guide

For each URL, it first attempts an HTTP HEAD request, and if that fails it will attempt an HTTP GET request, retrying several times by default with exponential falloff.

This module handles concurrency and retry logic so you can check the status of thousands of links quickly and robustly.

Install

This module requires node >= 8.

npm install --save check-links

Usage

const checkLinks = require('check-links')

const results = await checkLinks([
  'https://foo.com',
  'https://404.com',
])

results['https://foo.com'] // { status: 'alive', statusCode: 200 }
results['https://404.com'] // { status: 'dead', statusCode: 404 }

// example using a custom timeout and retry count
const results2 = await checkLinks([
  'https://foo.com',
  'https://404.com',
], {
  timeout: 30000,
  retry: 1
})
  • Supports HTTP and HTTPS urls.
  • Defaults to a 30 second timeout per HTTP request with 2 retries.
  • Defaults to a Mac OS Chrome user-agent.
  • Defaults to following redirects.

API

checkLinks

Robustly checks an array of URLs for liveness.

For each URL, it first attempts an HTTP HEAD request, and if that fails it will attempt an HTTP GET request, retrying several times by default with exponential falloff.

Returns a Map<String, LivenessResult> that maps each input URL to an object containing status and possibly statusCode.

LivenessResult.status will be one of the following:

  • alive if the URL is reachable (2XX status code)
  • dead if the URL is not reachable
  • invalid if the URL was parsed as invalid or used an unsupported protocol

LivenessResult.statusCode will contain an integer HTTP status code if that URL resolved properly.

Type: function (urls, opts)

  • urls array<string> Array of urls to test
  • opts object? Optional configuration options (any extra options are passed to got)
    • opts.concurrency number Maximum number of urls to resolve concurrently (optional, default 8)

Related

License

MIT © Travis Fischer

Support my OSS work by following me on twitter twitter

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].