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.

41 lines (40 loc) 1.46 kB
import { __extends, __read, __spreadArray } from "tslib"; export var StringWrapper = function () { var Class = Object.getPrototypeOf(this).constructor; var Constructor = Function.bind.apply(String, __spreadArray([null], __read(arguments))); var instance = new Constructor(); Object.setPrototypeOf(instance, Class.prototype); return instance; }; StringWrapper.prototype = Object.create(String.prototype, { constructor: { value: StringWrapper, enumerable: false, writable: true, configurable: true, }, }); Object.setPrototypeOf(StringWrapper, String); var LazyJsonString = (function (_super) { __extends(LazyJsonString, _super); function LazyJsonString() { return _super !== null && _super.apply(this, arguments) || this; } LazyJsonString.prototype.deserializeJSON = function () { return JSON.parse(_super.prototype.toString.call(this)); }; LazyJsonString.prototype.toJSON = function () { return _super.prototype.toString.call(this); }; LazyJsonString.fromObject = function (object) { if (object instanceof LazyJsonString) { return object; } else if (object instanceof String || typeof object === "string") { return new LazyJsonString(object); } return new LazyJsonString(JSON.stringify(object)); }; return LazyJsonString; }(StringWrapper)); export { LazyJsonString };