die-statement 1.0.1 → 1.0.2

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.
Files changed (3) hide show
  1. package/README.md +2 -4
  2. package/index.js +1 -1
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -18,13 +18,11 @@ function die(message = "Fatal Error") {
18
18
  return (() => {
19
19
  const error = new Error();
20
20
  const match = error.stack?.match(/^(?!die).*@(.*:\d+:\d+)$/m);
21
-
22
21
  if (match) {
23
- console.log(message, "\n\nDied at:", match[1]);
22
+ console.error(message, "\n\nDied at:", match[1]);
24
23
  } else {
25
- console.log(message, "Died at (location unknown)");
24
+ console.error(message, "\n\nDied at (location unknown)");
26
25
  }
27
-
28
26
  throw error;
29
27
  })();
30
28
  }
package/index.js CHANGED
@@ -6,7 +6,7 @@ export function die(message = "Fatal Error") {
6
6
  console.error(message, "\n\nDied at:", match[1]);
7
7
  }
8
8
  else {
9
- console.error(message, "Died at (location unknown)");
9
+ console.error(message, "\n\nDied at (location unknown)");
10
10
  }
11
11
  throw error;
12
12
  })();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "die-statement",
3
- "version": "1.0.1",
3
+ "version": "1.0.2",
4
4
  "description": "A simple and easy way to kill any application whenever you want, be it on a new line or as an inline statement!",
5
5
  "keywords": [
6
6
  "die",