@nanotime/http-please
Advanced tools
Comparing version 0.0.2 to 0.0.3
@@ -15,3 +15,3 @@ interface HttpPleaseOptions { | ||
} | ||
export default class HttpPlease { | ||
export declare class HttpPlease { | ||
url: URL; | ||
@@ -18,0 +18,0 @@ options?: RequestInit; |
@@ -8,3 +8,9 @@ var i = Object.defineProperty; | ||
n(this, "options"); | ||
t == null || delete t.method, this.url = new URL(r), this.options = t; | ||
t == null || delete t.method; | ||
try { | ||
this.url = new URL(r); | ||
} catch { | ||
throw new Error("The provided url is invalid"); | ||
} | ||
this.options = t; | ||
} | ||
@@ -11,0 +17,0 @@ async get({ path: r, query: t }) { |
@@ -1,1 +0,1 @@ | ||
export { default as HttpPlease } from './http-please'; | ||
export { HttpPlease } from './http-please'; |
{ | ||
"name": "@nanotime/http-please", | ||
"private": false, | ||
"version": "0.0.2", | ||
"version": "0.0.3", | ||
"type": "module", | ||
@@ -6,0 +6,0 @@ "main": "./dist/http-please.umd.cjs", |
Sorry, the diff of this file is not supported yet
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
7141
102