UNPKG

@softchef/cdk-iot-device-management

Version:

IoT device management is composed of things, thing types, thing groups, jobs, files API services. The constructs can be used independently, that are based on full-managed service to create an API Gateway & Lambda function.

16 lines (15 loc) 527 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.normalizeEndpoint = void 0; const normalizeEndpoint = ({ endpoint, urlParser }) => { if (typeof endpoint === "string") { const promisified = Promise.resolve(urlParser(endpoint)); return () => promisified; } else if (typeof endpoint === "object") { const promisified = Promise.resolve(endpoint); return () => promisified; } return endpoint; }; exports.normalizeEndpoint = normalizeEndpoint;