Socket
Socket
Sign inDemoInstall

@types/x-ray-crawler

Package Overview
Dependencies
4
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @types/x-ray-crawler

TypeScript definitions for x-ray-crawler


Version published
Weekly downloads
808
increased by7.45%
Maintainers
1
Install size
2.02 MB
Created
Weekly downloads
 

Readme

Source

Installation

npm install --save @types/x-ray-crawler

Summary

This package contains type definitions for x-ray-crawler (https://github.com/lapwinglabs/x-ray-crawler#readme).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/x-ray-crawler.

index.d.ts

import HttpContext = require("http-context");

export = XRayCrawler;

declare function XRayCrawler(driver?: XRayCrawler.Driver): XRayCrawler.Instance;

declare namespace XRayCrawler {
    type Callback<T> = (err: Error, obj: T) => void;
    type Driver = (context: HttpContext.Context, callback: Callback<HttpContext.Context>) => void;
    type RequestHook = (request: HttpContext.Request) => void;
    type ResponseHook = (response: HttpContext.Response) => void;
    type RandomDelay = () => number;

    interface Instance {
        (url: string, callback: Callback<HttpContext.Context>): void;
        driver(): Driver;
        driver(driver: Driver): this;
        throttle(): number;
        throttle(requests: string | number, rate: string | number): this;
        delay(): RandomDelay;
        delay(from: string | number, to?: string | number): this;
        timeout(): number;
        timeout(n: string | number): this;
        concurrency(): number;
        concurrency(n: number): this;
        request(): RequestHook;
        request(fn: RequestHook): this;
        response(): ResponseHook;
        response(fn: ResponseHook): this;
        limit(): number;
        limit(n: number): this;
    }
}

Additional Details

  • Last updated: Tue, 07 Nov 2023 15:11:36 GMT
  • Dependencies: @types/http-context

Credits

These definitions were written by Matt Traynham.

FAQs

Last updated on 07 Nov 2023

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc