augnitoambientsdk
Version:
Use this typescript SDK to integrate Augnito’s Ambient Tech within your EMR. To get access credentials or know more about how Augnito Ambient can benefit you, please visit our website and connect with our sales team: https://augnito.ai/
29 lines (28 loc) • 802 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.Guard = void 0;
class Guard {
constructor() {
// Constructor is private
}
static get Against() {
if (!Guard.instance) {
Guard.instance = new Guard();
}
return Guard.instance;
}
NullOrUndefined(value, paramName) {
if (value === null)
throw new TypeError(`${paramName} is null`);
if (value === undefined)
throw new TypeError(`${paramName} is undefined`);
return value;
}
NullOrEmpty(value, paramName) {
value = Guard.Against.NullOrUndefined(value, paramName);
if (!value)
throw new TypeError(`${paramName} is empty`);
return value;
}
}
exports.Guard = Guard;