jet-logger 1.1.3 → 1.1.4

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/lib/index.d.ts CHANGED
@@ -26,7 +26,10 @@ declare const levels: {
26
26
  prefix: string;
27
27
  };
28
28
  };
29
- declare const _default: {
29
+ declare type TLevelProp = typeof levels[keyof typeof levels];
30
+ declare type TJetLogger = ReturnType<typeof JetLogger>;
31
+ export declare type TCustomLogger = (timestamp: Date, prefix: string, content: any) => void;
32
+ export declare function JetLogger(mode?: LoggerModes, filePath?: string, timestamp?: boolean, format?: Formats, customLogger?: TCustomLogger): {
30
33
  readonly settings: {
31
34
  readonly mode: LoggerModes;
32
35
  readonly filePath: string;
@@ -40,11 +43,12 @@ declare const _default: {
40
43
  readonly err: typeof err;
41
44
  readonly printLog: typeof printLog;
42
45
  };
43
- export default _default;
44
- declare type TLevelProp = typeof levels[keyof typeof levels];
45
- declare type TJetLogger = ReturnType<typeof JetLogger>;
46
- export declare type TCustomLogger = (timestamp: Date, prefix: string, content: any) => void;
47
- export declare function JetLogger(mode?: LoggerModes, filePath?: string, timestamp?: boolean, format?: Formats, customLogger?: TCustomLogger): {
46
+ declare function info(this: TJetLogger, content: any, printFull?: boolean): void;
47
+ declare function imp(this: TJetLogger, content: any, printFull?: boolean): void;
48
+ declare function warn(this: TJetLogger, content: any, printFull?: boolean): void;
49
+ declare function err(this: TJetLogger, content: any, printFull?: boolean): void;
50
+ declare function printLog(this: TJetLogger, content: any, printFull: boolean, level: TLevelProp): void;
51
+ declare const _default: {
48
52
  readonly settings: {
49
53
  readonly mode: LoggerModes;
50
54
  readonly filePath: string;
@@ -58,8 +62,4 @@ export declare function JetLogger(mode?: LoggerModes, filePath?: string, timesta
58
62
  readonly err: typeof err;
59
63
  readonly printLog: typeof printLog;
60
64
  };
61
- declare function info(this: TJetLogger, content: any, printFull?: boolean): void;
62
- declare function imp(this: TJetLogger, content: any, printFull?: boolean): void;
63
- declare function warn(this: TJetLogger, content: any, printFull?: boolean): void;
64
- declare function err(this: TJetLogger, content: any, printFull?: boolean): void;
65
- declare function printLog(this: TJetLogger, content: any, printFull: boolean, level: TLevelProp): void;
65
+ export default _default;
package/lib/index.js CHANGED
@@ -48,7 +48,6 @@ var defaults = {
48
48
  timestamp: true,
49
49
  format: Formats.Line,
50
50
  };
51
- exports.default = JetLogger();
52
51
  function JetLogger(mode, filePath, timestamp, format, customLogger) {
53
52
  return {
54
53
  settings: getSettings(mode, filePath, timestamp, format, customLogger),
@@ -173,3 +172,4 @@ function writeToFile(content, filePath) {
173
172
  });
174
173
  });
175
174
  }
175
+ exports.default = JetLogger();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jet-logger",
3
- "version": "1.1.3",
3
+ "version": "1.1.4",
4
4
  "description": "A super quick, easy to setup logging tool for NodeJS/TypeScript.",
5
5
  "main": "./lib/index.js",
6
6
  "typings": "./lib/index.d.ts",