@ethersproject/web
Advanced tools
Comparing version 5.0.0-beta.132 to 5.0.0-beta.133
@@ -1,1 +0,1 @@ | ||
export declare const version = "web/5.0.0-beta.132"; | ||
export declare const version = "web/5.0.0-beta.133"; |
@@ -1,1 +0,1 @@ | ||
export const version = "web/5.0.0-beta.132"; | ||
export const version = "web/5.0.0-beta.133"; |
@@ -10,6 +10,6 @@ "use strict"; | ||
export function fetchJson(connection, json, processFunc) { | ||
let headers = {}; | ||
const headers = {}; | ||
let url = null; | ||
// @TODO: Allow ConnectionInfo to override some of these values | ||
let options = { | ||
const options = { | ||
method: "GET", | ||
@@ -36,3 +36,3 @@ mode: "cors", | ||
if (connection.headers) { | ||
for (let key in connection.headers) { | ||
for (const key in connection.headers) { | ||
headers[key.toLowerCase()] = { key: key, value: String(connection.headers[key]) }; | ||
@@ -48,3 +48,3 @@ if (["if-none-match", "if-modified-since"].indexOf(key.toLowerCase()) >= 0) { | ||
} | ||
let authorization = connection.user + ":" + connection.password; | ||
const authorization = connection.user + ":" + connection.password; | ||
headers["authorization"] = { | ||
@@ -67,3 +67,3 @@ key: "Authorization", | ||
} | ||
let cancelTimeout = () => { | ||
const cancelTimeout = () => { | ||
if (timer == null) { | ||
@@ -80,5 +80,5 @@ return; | ||
} | ||
let flatHeaders = {}; | ||
const flatHeaders = {}; | ||
Object.keys(headers).forEach((key) => { | ||
let header = headers[key]; | ||
const header = headers[key]; | ||
flatHeaders[header.key] = header.value; | ||
@@ -170,3 +170,3 @@ }); | ||
// Returns true if cancel was successful. Unsuccessful cancel means we're already done. | ||
let cancel = () => { | ||
const cancel = () => { | ||
if (done) { | ||
@@ -188,3 +188,3 @@ return false; | ||
} | ||
let retryLimit = options.retryLimit; | ||
const retryLimit = options.retryLimit; | ||
let attempt = 0; | ||
@@ -191,0 +191,0 @@ function check() { |
@@ -1,1 +0,1 @@ | ||
export declare const version = "web/5.0.0-beta.132"; | ||
export declare const version = "web/5.0.0-beta.133"; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.version = "web/5.0.0-beta.132"; | ||
exports.version = "web/5.0.0-beta.133"; |
{ | ||
"name": "@ethersproject/web", | ||
"version": "5.0.0-beta.132", | ||
"version": "5.0.0-beta.133", | ||
"description": "Utility fucntions for managing web requests for ethers.", | ||
@@ -32,3 +32,3 @@ "main": "./lib/index.js", | ||
"ethereum": "donations.ethers.eth", | ||
"tarballHash": "0x00945d88f20ffd917a2f8656d0ac21dc867c28b5bf02362461d414249b08f597" | ||
"tarballHash": "0x38e46adafbb3dcee332feb81054331f51c6034c376fa05e1d1d64ec65eb6255b" | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
21505