@apistudio/apim-cli
Version:
CLI for API Management Products
22 lines (21 loc) • 605 B
JavaScript
import { isNullOrUndefined } from '../helpers/common/data-helper.js';
export class DebugManager {
constructor() {
this.debugEnabled = false;
}
static getInstance() {
if (isNullOrUndefined(DebugManager.INSTANCE)) {
DebugManager.INSTANCE = new DebugManager();
}
return this.INSTANCE;
}
// Getter to check if debugging is enabled
isDebugEnabled() {
return this.debugEnabled;
}
// Setter to enable or disable debugging
setDebugEnabled(enabled) {
console.log(enabled);
this.debugEnabled = enabled;
}
}