UNPKG

wpt-api-client

Version:

Unofficial Node.js client for the WebPageTest REST API

17 lines 653 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.checkApiKey = exports.baseUrl = void 0; const defaults_1 = require("./defaults"); const error_1 = require("./error"); const baseUrl = (wptServer) => { return wptServer ? `https://${wptServer}` : `https://${defaults_1.WPT_SERVER}`; }; exports.baseUrl = baseUrl; const checkApiKey = (apiKey, wptServer) => { // I would need a private WPT instance to test this out if (apiKey === undefined && wptServer === undefined) { throw new Error(error_1.configurationErrorMessage()); } }; exports.checkApiKey = checkApiKey; //# sourceMappingURL=utils.js.map