ui-rn 1.0.7 → 1.0.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/globals.config.js +33 -0
- package/globals.d.ts +16 -0
- package/package.json +1 -1
- package/tsconfig.json +6 -0
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
const { isObject } = require("lodash");
|
|
2
|
+
const log = console.debug
|
|
3
|
+
|
|
4
|
+
class Log {
|
|
5
|
+
static e = (...a) => log(Color.red, ...a)
|
|
6
|
+
static e1 = (...a) => Log.format(Color.red, ...a)
|
|
7
|
+
static d = (...a) => log(Color.cyan, ...a)
|
|
8
|
+
static d1 = (...a) => Log.format(Color.cyan, ...a)
|
|
9
|
+
static g = (...a) => log(Color.green, ...a)
|
|
10
|
+
static g1 = (...a) => Log.format(Color.green, ...a)
|
|
11
|
+
static y = (...a) => log(Color.yellow, ...a)
|
|
12
|
+
static y1 = (...a) => Log.format(Color.yellow, ...a)
|
|
13
|
+
static format(color = Color.yellow, ...a) {
|
|
14
|
+
{
|
|
15
|
+
if (a.length == 1) {
|
|
16
|
+
log(color, JSON.stringify(a[0], null, ' '));
|
|
17
|
+
}
|
|
18
|
+
else if (a.length >= 2) {
|
|
19
|
+
const end = a.slice(2)
|
|
20
|
+
if (isObject(a[0])) log(JSON.stringify(a[0], null, ' '), JSON.stringify(a[1], null, ' '), ...end);
|
|
21
|
+
else log(color, a[0], JSON.stringify(a[1], null, ' '), ...end);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
const Color = {
|
|
28
|
+
red: '\x1b[31m',
|
|
29
|
+
green: '\x1b[32m',
|
|
30
|
+
yellow: '\x1b[33m',
|
|
31
|
+
cyan: '\x1b[36m',
|
|
32
|
+
}
|
|
33
|
+
window.Log = Log
|
package/globals.d.ts
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
declare module '*.svg' {
|
|
2
|
+
const content: string;
|
|
3
|
+
export default content;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
export class Log {
|
|
7
|
+
static e: (...message: any[]) => void;
|
|
8
|
+
static e1: (...message: any[]) => void;
|
|
9
|
+
static d: (...message: any[]) => void;
|
|
10
|
+
static d1: (...message: any[]) => void;
|
|
11
|
+
static g: (...message: any[]) => void;
|
|
12
|
+
static g1: (...message: any[]) => void;
|
|
13
|
+
static y: (...message: any[]) => void;
|
|
14
|
+
static y1: (...message: any[]) => void;
|
|
15
|
+
static format: (...message: any[]) => void;
|
|
16
|
+
}
|
package/package.json
CHANGED