UNPKG

@subsocial/utils

Version:
40 lines (39 loc) 1.09 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.SocialRemarkConfig = void 0; /** * SocialRemark config which will be used as global config for all * SocialRemark instances */ class SocialRemarkConfig { constructor() { this.conf = { protNames: [], actions: [ 'DMN_REG', 'DMN_REG_OK', 'DMN_REG_REFUND', 'DMN_REG_REFUND_OK', 'NRG_GEN', 'NRG_GEN_OK', 'NRG_GEN_REFUND', 'NRG_GEN_REFUND_OK' ], versions: ['0.1'], destinations: ['1', '2', '3'] }; } static getInstance() { if (!SocialRemarkConfig.instance) { SocialRemarkConfig.instance = new SocialRemarkConfig(); } return SocialRemarkConfig.instance; } get config() { return this.conf; } setConfig(data) { this.conf = Object.assign(Object.assign({}, this.conf), data); } } exports.SocialRemarkConfig = SocialRemarkConfig;