@soos-io/api-client
Advanced tools
Comparing version 0.1.6-pre.6 to 0.1.6-pre.7
declare const isNil: (value: unknown) => value is null | undefined; | ||
declare const ensureValue: <T>(value: T | null | undefined, propertyName: string) => T; | ||
declare const ensureEnumValue: <T, TEnumObject extends Record<string, T> = Record<string, T>>(enumObject: TEnumObject, inputValue: string | null | undefined, excludeDefault?: T | undefined, ignoreCase?: boolean) => T | undefined; | ||
declare const ensureEnumValue: <T, TEnumObject extends Record<string, T> = Record<string, T>>(enumObject: TEnumObject, inputValue: string | null | undefined, excludeDefault: keyof TEnumObject | null, ignoreCase?: boolean) => T | undefined; | ||
declare const sleep: (ms: number) => Promise<unknown>; | ||
@@ -5,0 +5,0 @@ declare const isUrlAvailable: (url: string) => Promise<boolean>; |
@@ -26,3 +26,3 @@ "use strict"; | ||
}); | ||
if (isNil(option) || (excludeDefault !== undefined && option === excludeDefault)) { | ||
if (isNil(option) || (excludeDefault && option.at(0) === excludeDefault)) { | ||
throw new Error(`Invalid enum value '${inputValue}'. Valid options are: ${options | ||
@@ -29,0 +29,0 @@ .map(([, value]) => value) |
{ | ||
"name": "@soos-io/api-client", | ||
"version": "0.1.6-pre.6", | ||
"version": "0.1.6-pre.7", | ||
"description": "This is the SOOS API Client for registered clients leveraging the various integrations to the SOOS platform.", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
34889