start refactor
This commit is contained in:
16
src/utils/logging.ts
Normal file
16
src/utils/logging.ts
Normal file
@@ -0,0 +1,16 @@
|
||||
import browser from 'webextension-polyfill';
|
||||
import config from '../config/config';
|
||||
|
||||
/**
|
||||
* Returns a promise with logging type variable.
|
||||
*
|
||||
* @returns {*}
|
||||
* @private
|
||||
*/
|
||||
export const getLoggingType = async (): Promise<string> => {
|
||||
const items = await browser.storage.sync.get({
|
||||
loggingType: config.loggingType,
|
||||
});
|
||||
|
||||
return items.loggingType;
|
||||
};
|
||||
Reference in New Issue
Block a user