Module: nyc/fetchTimeout


(require("nyc/fetchTimeout"))(url [, timeout])

Function to fetch a URL and fail if the response time exceeds the timeout value

Parameters:
Name Type Argument Default Description
url string

The url to fetch

timeout number <optional>
15000

The timeout in milliseconds

Source:
Returns:

A promise that resolves to the HTTP response object or a timeout error

Type
Promise