@sapphire-sh/utils 1.27.0 → 1.28.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.
package/lib/logger.js CHANGED
@@ -19,7 +19,7 @@ function log(level, message, payload) {
19
19
  }
20
20
  const ts = new Date().toISOString();
21
21
  const prefix = `[${ts}] [${LogLevel[level].toUpperCase()}]`;
22
- const payloadStr = payload !== undefined ? serializePayload(payload) : '';
22
+ const payloadStr = payload === undefined ? '' : serializePayload(payload);
23
23
  const output = `${prefix} ${message}${payloadStr}`;
24
24
  if (level === LogLevel.ERROR) {
25
25
  console.error(output);
package/lib/queue.d.ts CHANGED
@@ -3,7 +3,6 @@ export declare class Queue<T extends Value> {
3
3
  private head;
4
4
  private tail;
5
5
  private _size;
6
- constructor();
7
6
  enqueue(value: T): void;
8
7
  dequeue(): T | undefined;
9
8
  dequeueMultiple(count: number): T[];
package/lib/queue.js CHANGED
@@ -18,7 +18,6 @@ class Queue {
18
18
  head = null;
19
19
  tail = null;
20
20
  _size = 0;
21
- constructor() { }
22
21
  enqueue(value) {
23
22
  const newNode = new QueueNode(value);
24
23
  if (this.isEmpty() || !this.tail) {
@@ -71,10 +70,8 @@ class Queue {
71
70
  return true;
72
71
  }
73
72
  }
74
- else {
75
- if (node.value === value) {
76
- return true;
77
- }
73
+ else if (node.value === value) {
74
+ return true;
78
75
  }
79
76
  node = node.next;
80
77
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sapphire-sh/utils",
3
- "version": "1.27.0",
3
+ "version": "1.28.0",
4
4
  "description": "@sapphire-sh/utils",
5
5
  "main": "./lib/index.js",
6
6
  "types": "./lib/index.d.ts",