Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

third-party-resources-checker

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

third-party-resources-checker

[![Build Status](https://travis-ci.org/w3c/third-party-resources-checker.svg?branch=master)](https://travis-ci.org/w3c/third-party-resources-checker) [![Coverage Status](https://coveralls.io/repos/w3c/third-party-resources-checker/badge.svg)](https://cove

  • 1.0.1
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
14
Maintainers
1
Weekly downloads
 
Created
Source

Build Status Coverage Status Dependency Status devDependency Status

This phantomjs-based tool loads a Web-page and logs on the standard output any URL (one per line) the page requests while loading that is not a www.w3.org URL (as defined in the whitelisted_domains variable).

It is meant to become a component of a new streamlined W3C publication workflow.

Installation

Install the dependencies by running npm install.

Usage

Standalone

The checker can be run standalone via the command line:

  Usage: third-party-resources-checker [options] URI

  Options:

    -h, --help                  output usage information
    -V, --version               output the version number
    -w, --whitelist <filename>  optional JSON file containing URIs and domains that are deemed OK

  Examples:

    $ third-party-resources-checker http://page.to.be/checked
    $ third-party-resources-checker -w whitelist.json http://page.to.be/checked

As a module

The checker can also be run as a module. require('third-party-resources-checker') exposes a single check function:

check(uri, [whitelist]);

It returns a Promise of a tuple (as a JavaScript Array):

  • The first element is the exit code
  • The second element is an Array of String, each of them being an external resource

Whitelist format

When used standalone, the whitelist must be written in a JSON file. When used as a module, it must be given to the check() function as a JavaScript object literal. In both cases, its format is the following:

{
    "domains": [
        "www.foobar.org"
    ],
    "urls": [
        "http://example.org/image.jpg"
    ]
}

FAQs

Package last updated on 21 May 2015

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