@oscarpalmer/atoms 0.51.0 → 0.52.0

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.
@@ -58,19 +58,25 @@ function emitter(value) {
58
58
  destroy() {
59
59
  finish(false);
60
60
  },
61
- emit(value2) {
61
+ emit(value2, complete) {
62
62
  if (active) {
63
63
  stored = value2;
64
64
  for (const [, observer] of observers) {
65
65
  observer.next?.(value2);
66
66
  }
67
+ if (complete === true) {
68
+ finish(true);
69
+ }
67
70
  }
68
71
  },
69
- error(error) {
72
+ error(error, complete) {
70
73
  if (active) {
71
74
  for (const [, observer] of observers) {
72
75
  observer.error?.(error);
73
76
  }
77
+ if (complete === true) {
78
+ finish(true);
79
+ }
74
80
  }
75
81
  },
76
82
  finish() {
@@ -58,19 +58,25 @@ function emitter(value) {
58
58
  destroy() {
59
59
  finish(false);
60
60
  },
61
- emit(value2) {
61
+ emit(value2, complete) {
62
62
  if (active) {
63
63
  stored = value2;
64
64
  for (const [, observer] of observers) {
65
65
  observer.next?.(value2);
66
66
  }
67
+ if (complete === true) {
68
+ finish(true);
69
+ }
67
70
  }
68
71
  },
69
- error(error) {
72
+ error(error, complete) {
70
73
  if (active) {
71
74
  for (const [, observer] of observers) {
72
75
  observer.error?.(error);
73
76
  }
77
+ if (complete === true) {
78
+ finish(true);
79
+ }
74
80
  }
75
81
  },
76
82
  finish() {
@@ -0,0 +1,6 @@
1
+ // src/js/function.ts
2
+ function noop() {
3
+ }
4
+ export {
5
+ noop
6
+ };
@@ -0,0 +1,6 @@
1
+ // src/js/function.ts
2
+ function noop() {
3
+ }
4
+ export {
5
+ noop
6
+ };
package/dist/js/index.js CHANGED
@@ -955,23 +955,29 @@ function emitter(value) {
955
955
  destroy() {
956
956
  finish(false);
957
957
  },
958
- error(error) {
958
+ emit(value2, complete) {
959
959
  if (active) {
960
+ stored = value2;
960
961
  for (const [, observer] of observers) {
961
- observer.error?.(error);
962
+ observer.next?.(value2);
963
+ }
964
+ if (complete === true) {
965
+ finish(true);
962
966
  }
963
967
  }
964
968
  },
965
- finish() {
966
- finish(true);
967
- },
968
- next(value2) {
969
+ error(error, complete) {
969
970
  if (active) {
970
- stored = value2;
971
971
  for (const [, observer] of observers) {
972
- observer.next?.(value2);
972
+ observer.error?.(error);
973
+ }
974
+ if (complete === true) {
975
+ finish(true);
973
976
  }
974
977
  }
978
+ },
979
+ finish() {
980
+ finish(true);
975
981
  }
976
982
  });
977
983
  const observable = createObserable(instance, observers);
@@ -1007,16 +1013,16 @@ function getPosition(event) {
1007
1013
  }
1008
1014
  return typeof x === "number" && typeof y === "number" ? { x, y } : undefined;
1009
1015
  }
1010
- // src/js/log.ts
1016
+ // src/js/logger.ts
1011
1017
  var time = function(label) {
1012
- const started = log.enabled;
1018
+ const started = logger.enabled;
1013
1019
  let stopped = false;
1014
1020
  if (started) {
1015
1021
  console.time(label);
1016
1022
  }
1017
1023
  return Object.create({
1018
1024
  log() {
1019
- if (started && !stopped && log.enabled) {
1025
+ if (started && !stopped && logger.enabled) {
1020
1026
  console.timeLog(label);
1021
1027
  }
1022
1028
  },
@@ -1029,7 +1035,7 @@ var time = function(label) {
1029
1035
  });
1030
1036
  };
1031
1037
  var work = function(type, data) {
1032
- if (log.enabled) {
1038
+ if (logger.enabled) {
1033
1039
  console[type](...data);
1034
1040
  }
1035
1041
  };
@@ -1041,11 +1047,12 @@ var types = new Set([
1041
1047
  "debug",
1042
1048
  "error",
1043
1049
  "info",
1050
+ "log",
1044
1051
  "table",
1045
1052
  "trace",
1046
1053
  "warn"
1047
1054
  ]);
1048
- var log = (() => {
1055
+ var logger = (() => {
1049
1056
  const instance = Object.create(null);
1050
1057
  Object.defineProperties(instance, {
1051
1058
  enabled: {
@@ -1056,9 +1063,6 @@ var log = (() => {
1056
1063
  _atomic_logging = value;
1057
1064
  }
1058
1065
  },
1059
- it: {
1060
- value: (...data) => work("log", data)
1061
- },
1062
1066
  time: {
1063
1067
  value: time
1064
1068
  }
@@ -1133,15 +1137,11 @@ function getRandomInteger(min2, max2) {
1133
1137
  function getRandomHex() {
1134
1138
  return "0123456789ABCDEF"[getRandomInteger(0, 16)];
1135
1139
  }
1136
- // src/js/timer.ts
1137
- async function delay(time2) {
1138
- return new Promise((resolve) => {
1139
- wait(resolve, {
1140
- errorCallback: resolve,
1141
- interval: time2
1142
- });
1143
- });
1140
+ // src/js/function.ts
1141
+ function noop() {
1144
1142
  }
1143
+
1144
+ // src/js/timer.ts
1145
1145
  var getValueOrDefault = function(value, defaultValue) {
1146
1146
  return typeof value === "number" && value > 0 ? value : defaultValue;
1147
1147
  };
@@ -1361,8 +1361,6 @@ var work2 = function(type, timer2, state, options, isRepeated2) {
1361
1361
  var activeTimers = new Set;
1362
1362
  var hiddenTimers = new Set;
1363
1363
  var milliseconds = 16.666666666666668;
1364
- var noop = () => {
1365
- };
1366
1364
  document.addEventListener("visibilitychange", () => {
1367
1365
  if (document.hidden) {
1368
1366
  for (const timer2 of activeTimers) {
@@ -1559,7 +1557,7 @@ export {
1559
1557
  min,
1560
1558
  merge,
1561
1559
  max,
1562
- log,
1560
+ logger,
1563
1561
  kebabCase,
1564
1562
  join,
1565
1563
  isWhen,
@@ -1609,7 +1607,6 @@ export {
1609
1607
  equal,
1610
1608
  emitter,
1611
1609
  diff,
1612
- delay,
1613
1610
  createUuid,
1614
1611
  clone,
1615
1612
  clamp,
package/dist/js/index.mjs CHANGED
@@ -8,7 +8,7 @@ export * from "./equal";
8
8
  export * from "./emitter";
9
9
  export * from "./event";
10
10
  export * from "./is";
11
- export * from "./log";
11
+ export * from "./logger";
12
12
  export * from "./math";
13
13
  export * from "./models";
14
14
  export * from "./number";
@@ -1,13 +1,13 @@
1
- // src/js/log.ts
1
+ // src/js/logger.ts
2
2
  var time = function(label) {
3
- const started = log.enabled;
3
+ const started = logger.enabled;
4
4
  let stopped = false;
5
5
  if (started) {
6
6
  console.time(label);
7
7
  }
8
8
  return Object.create({
9
9
  log() {
10
- if (started && !stopped && log.enabled) {
10
+ if (started && !stopped && logger.enabled) {
11
11
  console.timeLog(label);
12
12
  }
13
13
  },
@@ -20,7 +20,7 @@ var time = function(label) {
20
20
  });
21
21
  };
22
22
  var work = function(type, data) {
23
- if (log.enabled) {
23
+ if (logger.enabled) {
24
24
  console[type](...data);
25
25
  }
26
26
  };
@@ -32,11 +32,12 @@ var types = new Set([
32
32
  "debug",
33
33
  "error",
34
34
  "info",
35
+ "log",
35
36
  "table",
36
37
  "trace",
37
38
  "warn"
38
39
  ]);
39
- var log = (() => {
40
+ var logger = (() => {
40
41
  const instance = Object.create(null);
41
42
  Object.defineProperties(instance, {
42
43
  enabled: {
@@ -47,9 +48,6 @@ var log = (() => {
47
48
  _atomic_logging = value;
48
49
  }
49
50
  },
50
- it: {
51
- value: (...data) => work("log", data)
52
- },
53
51
  time: {
54
52
  value: time
55
53
  }
@@ -62,5 +60,5 @@ var log = (() => {
62
60
  return instance;
63
61
  })();
64
62
  export {
65
- log
63
+ logger
66
64
  };
@@ -1,13 +1,13 @@
1
- // src/js/log.ts
1
+ // src/js/logger.ts
2
2
  var time = function(label) {
3
- const started = log.enabled;
3
+ const started = logger.enabled;
4
4
  let stopped = false;
5
5
  if (started) {
6
6
  console.time(label);
7
7
  }
8
8
  return Object.create({
9
9
  log() {
10
- if (started && !stopped && log.enabled) {
10
+ if (started && !stopped && logger.enabled) {
11
11
  console.timeLog(label);
12
12
  }
13
13
  },
@@ -20,7 +20,7 @@ var time = function(label) {
20
20
  });
21
21
  };
22
22
  var work = function(type, data) {
23
- if (log.enabled) {
23
+ if (logger.enabled) {
24
24
  console[type](...data);
25
25
  }
26
26
  };
@@ -32,11 +32,12 @@ var types = new Set([
32
32
  "debug",
33
33
  "error",
34
34
  "info",
35
+ "log",
35
36
  "table",
36
37
  "trace",
37
38
  "warn"
38
39
  ]);
39
- var log = (() => {
40
+ var logger = (() => {
40
41
  const instance = Object.create(null);
41
42
  Object.defineProperties(instance, {
42
43
  enabled: {
@@ -47,9 +48,6 @@ var log = (() => {
47
48
  _atomic_logging = value;
48
49
  }
49
50
  },
50
- it: {
51
- value: (...data) => work("log", data)
52
- },
53
51
  time: {
54
52
  value: time
55
53
  }
@@ -62,5 +60,5 @@ var log = (() => {
62
60
  return instance;
63
61
  })();
64
62
  export {
65
- log
63
+ logger
66
64
  };
package/dist/js/timer.js CHANGED
@@ -1,3 +1,7 @@
1
+ // src/js/function.ts
2
+ function noop() {
3
+ }
4
+
1
5
  // src/js/timer.ts
2
6
  var getValueOrDefault = function(value, defaultValue) {
3
7
  return typeof value === "number" && value > 0 ? value : defaultValue;
@@ -192,22 +196,21 @@ var work = function(type, timer2, state, options, isRepeated2) {
192
196
  const time = timestamp - current;
193
197
  state.elapsed = elapsed + (current - start);
194
198
  const finished = time - elapsed >= total;
199
+ if (timestamp - start >= timeout - elapsed) {
200
+ finish(finished, !finished);
201
+ return;
202
+ }
195
203
  if (finished || time >= minimum) {
196
204
  if (state.active) {
197
205
  state.callback(isRepeated2 ? index : undefined);
198
206
  }
199
207
  index += 1;
200
208
  state.index = index;
201
- switch (true) {
202
- case (canTimeout && !finished && timestamp - start >= timeout - elapsed):
203
- finish(false, true);
204
- return;
205
- case (!finished && index < count):
206
- current = null;
207
- break;
208
- default:
209
- finish(true, false);
210
- return;
209
+ if (!finished && index < count) {
210
+ current = null;
211
+ } else {
212
+ finish(true, false);
213
+ return;
211
214
  }
212
215
  }
213
216
  state.frame = requestAnimationFrame(step);
@@ -219,8 +222,6 @@ var work = function(type, timer2, state, options, isRepeated2) {
219
222
  var activeTimers = new Set;
220
223
  var hiddenTimers = new Set;
221
224
  var milliseconds = 16.666666666666668;
222
- var noop = () => {
223
- };
224
225
  document.addEventListener("visibilitychange", () => {
225
226
  if (document.hidden) {
226
227
  for (const timer2 of activeTimers) {
package/dist/js/timer.mjs CHANGED
@@ -1,4 +1,5 @@
1
1
  // src/js/timer.ts
2
+ import {noop} from "./function";
2
3
  var getValueOrDefault = function(value, defaultValue) {
3
4
  return typeof value === "number" && value > 0 ? value : defaultValue;
4
5
  };
@@ -192,22 +193,21 @@ var work = function(type, timer2, state, options, isRepeated2) {
192
193
  const time = timestamp - current;
193
194
  state.elapsed = elapsed + (current - start);
194
195
  const finished = time - elapsed >= total;
196
+ if (timestamp - start >= timeout - elapsed) {
197
+ finish(finished, !finished);
198
+ return;
199
+ }
195
200
  if (finished || time >= minimum) {
196
201
  if (state.active) {
197
202
  state.callback(isRepeated2 ? index : undefined);
198
203
  }
199
204
  index += 1;
200
205
  state.index = index;
201
- switch (true) {
202
- case (canTimeout && !finished && timestamp - start >= timeout - elapsed):
203
- finish(false, true);
204
- return;
205
- case (!finished && index < count):
206
- current = null;
207
- break;
208
- default:
209
- finish(true, false);
210
- return;
206
+ if (!finished && index < count) {
207
+ current = null;
208
+ } else {
209
+ finish(true, false);
210
+ return;
211
211
  }
212
212
  }
213
213
  state.frame = requestAnimationFrame(step);
@@ -219,8 +219,6 @@ var work = function(type, timer2, state, options, isRepeated2) {
219
219
  var activeTimers = new Set;
220
220
  var hiddenTimers = new Set;
221
221
  var milliseconds = 16.666666666666668;
222
- var noop = () => {
223
- };
224
222
  document.addEventListener("visibilitychange", () => {
225
223
  if (document.hidden) {
226
224
  for (const timer2 of activeTimers) {
package/package.json CHANGED
@@ -132,5 +132,5 @@
132
132
  },
133
133
  "type": "module",
134
134
  "types": "./types/index.d.ts",
135
- "version": "0.51.0"
135
+ "version": "0.52.0"
136
136
  }
package/src/js/emitter.ts CHANGED
@@ -1,15 +1,42 @@
1
1
  export type Emitter<Value> = {
2
+ /**
3
+ * Is the emitter active?
4
+ */
2
5
  readonly active: boolean;
6
+ /**
7
+ * The observable that can be subscribed to
8
+ */
3
9
  readonly observable: Observable<Value>;
10
+ /**
11
+ * The current value
12
+ */
4
13
  readonly value: Value;
14
+ /**
15
+ * Destroys the emitter
16
+ */
5
17
  destroy(): void;
6
- error(error: Error): void;
18
+ /**
19
+ * Emits a new value _(and optionally finishes the emitter)_
20
+ */
21
+ emit(value: Value, finish?: boolean): void;
22
+ /**
23
+ * Emits an error _(and optionally finishes the emitter)_
24
+ */
25
+ error(error: Error, finish?: boolean): void;
26
+ /**
27
+ * Finishes the emitter
28
+ */
7
29
  finish(): void;
8
- next(value: Value): void;
9
30
  };
10
31
 
11
32
  export type Observable<Value> = {
33
+ /**
34
+ * Subscribes to value changes
35
+ */
12
36
  subscribe(observer: Observer<Value>): Subscription;
37
+ /**
38
+ * Subscribes to value changes
39
+ */
13
40
  subscribe(
14
41
  onNext: (value: Value) => void,
15
42
  onError?: (error: Error) => void,
@@ -18,13 +45,28 @@ export type Observable<Value> = {
18
45
  };
19
46
 
20
47
  export type Observer<Value> = {
48
+ /**
49
+ * Callback for when the observable is complete
50
+ */
21
51
  complete?: () => void;
52
+ /**
53
+ * Callback for when the observable has an error
54
+ */
22
55
  error?: (error: Error) => void;
56
+ /**
57
+ * Callback for when the observable has a new value
58
+ */
23
59
  next?: (value: Value) => void;
24
60
  };
25
61
 
26
62
  export type Subscription = {
27
- closed: boolean;
63
+ /**
64
+ * Is the subscription closed?
65
+ */
66
+ readonly closed: boolean;
67
+ /**
68
+ * Unsubscribes from the observable
69
+ */
28
70
  unsubscribe(): void;
29
71
  };
30
72
 
@@ -95,6 +137,9 @@ function getObserver<Value>(
95
137
  return observer;
96
138
  }
97
139
 
140
+ /**
141
+ * Creates a new emitter
142
+ */
98
143
  export function emitter<Value>(value: Value): Emitter<Value> {
99
144
  let active = true;
100
145
  let stored = value;
@@ -119,25 +164,33 @@ export function emitter<Value>(value: Value): Emitter<Value> {
119
164
  destroy() {
120
165
  finish(false);
121
166
  },
122
- error(error: Error) {
167
+ emit(value: Value, complete?: boolean) {
123
168
  if (active) {
169
+ stored = value;
170
+
124
171
  for (const [, observer] of observers) {
125
- observer.error?.(error);
172
+ observer.next?.(value);
173
+ }
174
+
175
+ if (complete === true) {
176
+ finish(true);
126
177
  }
127
178
  }
128
179
  },
129
- finish() {
130
- finish(true);
131
- },
132
- next(value: Value) {
180
+ error(error: Error, complete?: boolean) {
133
181
  if (active) {
134
- stored = value;
135
-
136
182
  for (const [, observer] of observers) {
137
- observer.next?.(value);
183
+ observer.error?.(error);
184
+ }
185
+
186
+ if (complete === true) {
187
+ finish(true);
138
188
  }
139
189
  }
140
190
  },
191
+ finish() {
192
+ finish(true);
193
+ },
141
194
  } as Emitter<Value>);
142
195
 
143
196
  const observable = createObserable<Value>(instance, observers);
@@ -0,0 +1,4 @@
1
+ /**
2
+ * A function that does nothing, which can be useful, I guess…
3
+ */
4
+ export function noop(): void {}
package/src/js/index.ts CHANGED
@@ -7,7 +7,7 @@ export * from './equal';
7
7
  export * from './emitter';
8
8
  export * from './event';
9
9
  export * from './is';
10
- export * from './log';
10
+ export * from './logger';
11
11
  export * from './math';
12
12
  export * from './models';
13
13
  export * from './number';
@@ -6,7 +6,7 @@ if (globalThis._atomic_logging == null) {
6
6
  globalThis._atomic_logging = true;
7
7
  }
8
8
 
9
- type Log = {
9
+ type Logger = {
10
10
  /**
11
11
  * Is logging to the console enabled? _(defaults to `true`)_
12
12
  */
@@ -30,7 +30,7 @@ type Log = {
30
30
  /**
31
31
  * Logs any number of values at the "log" log level
32
32
  */
33
- it(data: unknown): void;
33
+ log(data: unknown): void;
34
34
  /**
35
35
  * Logs data as a table, with optional properties to use as columns
36
36
  */
@@ -78,12 +78,13 @@ const types = new Set<Type>([
78
78
  'debug',
79
79
  'error',
80
80
  'info',
81
+ 'log',
81
82
  'table',
82
83
  'trace',
83
84
  'warn',
84
85
  ]);
85
86
 
86
- const log = (() => {
87
+ const logger = (() => {
87
88
  const instance = Object.create(null);
88
89
 
89
90
  Object.defineProperties(instance, {
@@ -95,9 +96,6 @@ const log = (() => {
95
96
  _atomic_logging = value;
96
97
  },
97
98
  },
98
- it: {
99
- value: (...data: unknown[]) => work('log', data),
100
- },
101
99
  time: {
102
100
  value: time,
103
101
  },
@@ -110,10 +108,10 @@ const log = (() => {
110
108
  }
111
109
 
112
110
  return instance;
113
- })() as Log;
111
+ })() as Logger;
114
112
 
115
113
  function time(label: string): Time {
116
- const started = log.enabled;
114
+ const started = logger.enabled;
117
115
 
118
116
  let stopped = false;
119
117
 
@@ -123,7 +121,7 @@ function time(label: string): Time {
123
121
 
124
122
  return Object.create({
125
123
  log() {
126
- if (started && !stopped && log.enabled) {
124
+ if (started && !stopped && logger.enabled) {
127
125
  console.timeLog(label);
128
126
  }
129
127
  },
@@ -138,9 +136,9 @@ function time(label: string): Time {
138
136
  }
139
137
 
140
138
  function work(type: Type, data: unknown[]): void {
141
- if (log.enabled) {
139
+ if (logger.enabled) {
142
140
  console[type](...data);
143
141
  }
144
142
  }
145
143
 
146
- export {log};
144
+ export {logger};
package/src/js/timer.ts CHANGED
@@ -1,3 +1,4 @@
1
+ import {noop} from './function';
1
2
  import type {PlainObject} from './models';
2
3
 
3
4
  /**
@@ -140,8 +141,6 @@ const hiddenTimers = new Set<Timer>();
140
141
  */
141
142
  const milliseconds = 1_000 / 60;
142
143
 
143
- const noop = () => {};
144
-
145
144
  function getValueOrDefault(value: unknown, defaultValue: number): number {
146
145
  return typeof value === 'number' && value > 0 ? value : defaultValue;
147
146
  }
@@ -1,23 +1,68 @@
1
1
  export type Emitter<Value> = {
2
+ /**
3
+ * Is the emitter active?
4
+ */
2
5
  readonly active: boolean;
3
- readonly obserable: Observable<Value>;
6
+ /**
7
+ * The observable that can be subscribed to
8
+ */
9
+ readonly observable: Observable<Value>;
10
+ /**
11
+ * The current value
12
+ */
4
13
  readonly value: Value;
14
+ /**
15
+ * Destroys the emitter
16
+ */
5
17
  destroy(): void;
6
- emit(value: Value): void;
7
- error(error: Error): void;
18
+ /**
19
+ * Emits a new value _(and optionally finishes the emitter)_
20
+ */
21
+ emit(value: Value, finish?: boolean): void;
22
+ /**
23
+ * Emits an error _(and optionally finishes the emitter)_
24
+ */
25
+ error(error: Error, finish?: boolean): void;
26
+ /**
27
+ * Finishes the emitter
28
+ */
8
29
  finish(): void;
9
30
  };
10
31
  export type Observable<Value> = {
32
+ /**
33
+ * Subscribes to value changes
34
+ */
11
35
  subscribe(observer: Observer<Value>): Subscription;
36
+ /**
37
+ * Subscribes to value changes
38
+ */
12
39
  subscribe(onNext: (value: Value) => void, onError?: (error: Error) => void, onComplete?: () => void): Subscription;
13
40
  };
14
41
  export type Observer<Value> = {
42
+ /**
43
+ * Callback for when the observable is complete
44
+ */
15
45
  complete?: () => void;
46
+ /**
47
+ * Callback for when the observable has an error
48
+ */
16
49
  error?: (error: Error) => void;
50
+ /**
51
+ * Callback for when the observable has a new value
52
+ */
17
53
  next?: (value: Value) => void;
18
54
  };
19
55
  export type Subscription = {
20
- closed: boolean;
56
+ /**
57
+ * Is the subscription closed?
58
+ */
59
+ readonly closed: boolean;
60
+ /**
61
+ * Unsubscribes from the observable
62
+ */
21
63
  unsubscribe(): void;
22
64
  };
65
+ /**
66
+ * Creates a new emitter
67
+ */
23
68
  export declare function emitter<Value>(value: Value): Emitter<Value>;
@@ -0,0 +1,4 @@
1
+ /**
2
+ * A function that does nothing, which can be useful, I guess…
3
+ */
4
+ export declare function noop(): void;
package/types/index.d.ts CHANGED
@@ -7,7 +7,7 @@ export * from './equal';
7
7
  export * from './emitter';
8
8
  export * from './event';
9
9
  export * from './is';
10
- export * from './log';
10
+ export * from './logger';
11
11
  export * from './math';
12
12
  export * from './models';
13
13
  export * from './number';
@@ -1,7 +1,7 @@
1
1
  declare global {
2
2
  var _atomic_logging: boolean;
3
3
  }
4
- type Log = {
4
+ type Logger = {
5
5
  /**
6
6
  * Is logging to the console enabled? _(defaults to `true`)_
7
7
  */
@@ -25,7 +25,7 @@ type Log = {
25
25
  /**
26
26
  * Logs any number of values at the "log" log level
27
27
  */
28
- it(data: unknown): void;
28
+ log(data: unknown): void;
29
29
  /**
30
30
  * Logs data as a table, with optional properties to use as columns
31
31
  */
@@ -56,5 +56,5 @@ type Time = {
56
56
  */
57
57
  stop(): void;
58
58
  };
59
- declare const log: Log;
60
- export { log };
59
+ declare const logger: Logger;
60
+ export { logger };