Socket
Socket
Sign inDemoInstall

find-reachable-urls

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

find-reachable-urls

Passes back all URLs which respond with status code 200.


Version published
Weekly downloads
5
decreased by-70.59%
Maintainers
1
Weekly downloads
 
Created
Source

find-reachable-urls Build Status

Passes back all URLs which respond with status code 200.

Installation

npm install find-reachable-urls --save

Usage

const findReachableUrls = require('find-reachable-urls')
const urls = [
  'https://google.com', // 200
  'https://github.com/nonexistent-url', // 404
  'https://github.com/OctoLinker/chrome-extension', // 301
]

findReachableUrls(urls)
  .then(function(reachableUrls) {
    console.log(reachableUrls)
    // ['https://google.com', 'https://github.com/OctoLinker/chrome-extension']
  })
  .catch(function(err) {
    // handle error
  })

Node-style callbacks are supported too:

findReachableUrls(urls, function(err, reachableUrls) { /*...*/ })

If you just need to look up one URL, pass it as an argument instead of an array:

findReachableUrls('http://mysite.com').then(...)

Tests

npm install
npm test
  • heads: Make parallel HEAD requests for an array of URLs and get back their HTTP status codes.

License

MIT

FAQs

Package last updated on 21 Feb 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc