@indigov/flags-api
Advanced tools
Comparing version 0.0.3 to 0.0.4
{ | ||
"name": "@indigov/flags-api", | ||
"version": "0.0.3", | ||
"version": "0.0.4", | ||
"description": "Strongly typed React/Node client for the Flags service", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
@@ -1,2 +0,2 @@ | ||
# F.L.A.G.S API Client | ||
# F.L.A.G.S. API Client | ||
@@ -3,0 +3,0 @@ Cross-platform Typescript SDK for the [Flags](https://github.com/indigov-us/flags) service. |
@@ -42,3 +42,4 @@ import fetch from 'cross-fetch' | ||
*/ | ||
public getFlag = async (flag: string, officeOverride?: string): Promise<GetFlagResponse> => this.request(`flag/${flag}/${officeOverride || this.office}`) | ||
public getFlag = async (flag: string, officeOverride?: string): Promise<boolean> => | ||
(await this.request<GetFlagResponse>(`flag/${flag}/${officeOverride || this.office}`)).value | ||
@@ -55,3 +56,3 @@ /** | ||
private request = (path: string) => | ||
private request = <T>(path: string): Promise<T> => | ||
fetch(`${this.endpoint}/${path}`, { | ||
@@ -58,0 +59,0 @@ method: 'GET', |
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
11916
155