UNPKG

sinch-rtc

Version:

RTC JavaScript/Web SDK

36 lines 994 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.TypeHelper = void 0; /** * Helper functions concerning types of variables TODO: check if required while using TypeScript */ class TypeHelper { static isPlainObject(o) { return Object.prototype.toString.call(o) === "[object Object]"; } static isArray(a) { return Array.isArray(a); } static isString(s) { return typeof s === "string" || s instanceof String; } static isWordArray(i) { if (i.words && this.isArray(i.words) && i.sigBytes) { return true; } else { return false; } } static isDateObject(d) { return Object.prototype.toString.call(d) === "[object Date]"; } static isBoolean(b) { return typeof b === "boolean"; } static isNumber(n) { return typeof n === "number"; } } exports.TypeHelper = TypeHelper; //# sourceMappingURL=Type.helper.js.map