mirror of
https://github.com/zhigang1992/react-native-firebase.git
synced 2026-04-24 04:24:52 +08:00
[js] Run prettier for the first time
This commit is contained in:
@@ -5,7 +5,7 @@ import { windowOrGlobal } from './';
|
||||
|
||||
import type ModuleBase from './ModuleBase';
|
||||
|
||||
((base) => {
|
||||
(base => {
|
||||
window = base || window;
|
||||
// $FlowFixMe: Why are we using localStorage at all?
|
||||
if (!window.localStorage) window.localStorage = {};
|
||||
@@ -15,7 +15,8 @@ import type ModuleBase from './ModuleBase';
|
||||
|
||||
const NATIVE_LOGGERS: { [string]: Object } = {};
|
||||
|
||||
const getModuleKey = (module: ModuleBase): string => `${module.app.name}:${module.namespace}`;
|
||||
const getModuleKey = (module: ModuleBase): string =>
|
||||
`${module.app.name}:${module.namespace}`;
|
||||
|
||||
export const getLogger = (module: ModuleBase) => {
|
||||
const key = getModuleKey(module);
|
||||
@@ -25,12 +26,14 @@ export const getLogger = (module: ModuleBase) => {
|
||||
export const initialiseLogger = (module: ModuleBase, logNamespace: string) => {
|
||||
const key = getModuleKey(module);
|
||||
if (!NATIVE_LOGGERS[key]) {
|
||||
// eslint-disable-next-line global-require
|
||||
NATIVE_LOGGERS[key] = require('bows')(`🔥 ${logNamespace.toUpperCase()}`);
|
||||
}
|
||||
};
|
||||
|
||||
export default class Log {
|
||||
static createLogger(namespace: string) {
|
||||
// eslint-disable-next-line global-require
|
||||
return require('bows')(namespace);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user