@neoskop/aviation-client
Advanced tools
Comparing version 0.1.2 to 0.1.3
{ | ||
"name": "@neoskop/aviation-client", | ||
"version": "0.1.2", | ||
"version": "0.1.3", | ||
"main": "dist/index.js", | ||
@@ -5,0 +5,0 @@ "typings": "dist/index.d.ts", |
@@ -0,6 +1,34 @@ | ||
![Aviation](logo.png) | ||
# Aviation Client for Typescript # | ||
This library enables you to check against an [Aviation Server](https://bitbucket.org/neoskop/aviation) whether a feature is supposedly enabled or not. | ||
## Usage ## | ||
To add the library to your project: | ||
```sh | ||
$ yarn add @neoskop/aviation-client | ||
``` | ||
To check for a feature: | ||
```typescript | ||
let client: AviationClient = aviation().endpoint('http://localhost:8080').token('sup3rs3cr3t').mix(); | ||
client.feature('test-feature-1').then(f => { | ||
if (f.enabled) { | ||
console.log('feature is enabled!'); | ||
} else { | ||
console.log('feature is disabled!'); | ||
} | ||
}).catch(() => { | ||
console.log('could not retrieve feature from server!'); | ||
}); | ||
``` | ||
## Test suite ## | ||
To run integration tests: | ||
To run integration tests in case you checked out the repository (awesome!): | ||
@@ -7,0 +35,0 @@ ```sh |
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
17065
37