kutt
Version:
Node.js & browser (TypeScript) client for Kutt url shortener
25 lines • 501 B
JavaScript
import API from "#src/API";
/**
*
* @see {@link https://docs.kutt.it/#tag/health}
* @example
* const health = new Health(config);
*/
export default class Health extends API {
/**
*
* @protected
*/
prefix = "/health";
/**
* Checks API health.
* @example
* const isHealthy = await health.check();
*/
async check() {
return this.get()
.then(() => true)
.catch(() => false);
}
}
//# sourceMappingURL=Health.js.map