diff --git a/src/Client.ts b/src/Client.ts index ac8a76831..398bd5bcd 100644 --- a/src/Client.ts +++ b/src/Client.ts @@ -16,7 +16,7 @@ import { HTTPClient } from "./HTTPClient"; import { HTTPClientFactory } from "./HTTPClientFactory"; import { ClientOptions } from "./IClientOptions"; import { Options } from "./IOptions"; -import { validatePolyFilling } from "./ValidatePolyFilling"; +import { validatePolyfilling } from "./ValidatePolyfilling"; export class Client { /** @@ -70,7 +70,7 @@ export class Client { * @param {ClientOptions} clientOptions - The options to instantiate the client object */ private constructor(clientOptions: ClientOptions) { - validatePolyFilling(); + validatePolyfilling(); for (const key in clientOptions) { if (Object.prototype.hasOwnProperty.call(clientOptions, key)) { this.config[key] = clientOptions[key]; diff --git a/src/ValidatePolyFilling.ts b/src/ValidatePolyFilling.ts index 53ec11823..464cec9f4 100644 --- a/src/ValidatePolyFilling.ts +++ b/src/ValidatePolyFilling.ts @@ -12,18 +12,18 @@ * @returns The true in case the Promise and fetch available, otherwise throws error */ -export const validatePolyFilling = (): boolean => { +export const validatePolyfilling = (): boolean => { if (typeof Promise === "undefined" && typeof fetch === "undefined") { - const error = new Error("Library cannot function without Promise and fetch. So, please provide polyfill for them."); - error.name = "PolyFillNotAvailable"; + const error = new Error("Library cannot function without Promise and fetch. So, please provide a polyfill for them."); + error.name = "PolyfillNotAvailable"; throw error; } else if (typeof Promise === "undefined") { - const error = new Error("Library cannot function without Promise. So, please provide polyfill for it."); - error.name = "PolyFillNotAvailable"; + const error = new Error("Library cannot function without Promise. So, please provide a polyfill for it."); + error.name = "PolyfillNotAvailable"; throw error; } else if (typeof fetch === "undefined") { - const error = new Error("Library cannot function without fetch. So, please provide polyfill for it."); - error.name = "PolyFillNotAvailable"; + const error = new Error("Library cannot function without fetch. So, please provide a polyfill for it."); + error.name = "PolyfillNotAvailable"; throw error; } return true;