UNPKG

kutt

Version:

Node.js & browser (TypeScript) client for Kutt url shortener

31 lines 762 B
"use strict"; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); const API_1 = __importDefault(require("#src/API")); /** * * @see {@link https://docs.kutt.it/#tag/health} * @example * const health = new Health(config); */ class Health extends API_1.default { /** * * @protected */ prefix = "/health"; /** * Checks API health. * @example * const isHealthy = await health.check(); */ async check() { return this.get() .then(() => true) .catch(() => false); } } exports.default = Health; //# sourceMappingURL=Health.js.map