resumon 2.0.12 → 2.0.13

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 (2) hide show
  1. package/dist/index.mjs +20 -20
  2. package/package.json +4 -4
package/dist/index.mjs CHANGED
@@ -1,17 +1,17 @@
1
1
  var a = Object.defineProperty;
2
- var i = (t, r, n) => r in t ? a(t, r, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[r] = n;
3
- var e = (t, r, n) => i(t, typeof r != "symbol" ? r + "" : r, n);
4
- class u extends Error {
2
+ var i = (e, r, n) => r in e ? a(e, r, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[r] = n;
3
+ var t = (e, r, n) => i(e, typeof r != "symbol" ? r + "" : r, n);
4
+ class s extends Error {
5
5
  }
6
- class o {
6
+ class u {
7
7
  // eslint-disable-next-line node/handle-callback-err
8
8
  constructor(r) {
9
- e(this, "isOk", !1);
10
- e(this, "isError", !0);
9
+ t(this, "isOk", !1);
10
+ t(this, "isError", !0);
11
11
  this.error = r;
12
12
  }
13
13
  get() {
14
- throw new u("Cannot get data or Err");
14
+ throw new s("Cannot get data or Err");
15
15
  }
16
16
  getOrElse(r) {
17
17
  return r;
@@ -40,16 +40,16 @@ class o {
40
40
  return this;
41
41
  }
42
42
  mapError(r) {
43
- return new o(r(this.error));
43
+ return new u(r(this.error));
44
44
  }
45
45
  }
46
- function d(t) {
47
- return new o(t);
46
+ function d(e) {
47
+ return new u(e);
48
48
  }
49
- class s {
49
+ class o {
50
50
  constructor(r) {
51
- e(this, "isOk", !0);
52
- e(this, "isError", !1);
51
+ t(this, "isOk", !0);
52
+ t(this, "isError", !1);
53
53
  this.data = r;
54
54
  }
55
55
  get() {
@@ -65,7 +65,7 @@ class s {
65
65
  return this.data;
66
66
  }
67
67
  getError() {
68
- throw new u("Cannot get error of Ok");
68
+ throw new s("Cannot get error of Ok");
69
69
  }
70
70
  getErrorOrElse(r) {
71
71
  return r;
@@ -79,19 +79,19 @@ class s {
79
79
  return r(this.data);
80
80
  }
81
81
  map(r) {
82
- return new s(r(this.data));
82
+ return new o(r(this.data));
83
83
  }
84
84
  mapError() {
85
85
  return this;
86
86
  }
87
87
  }
88
- function h(t) {
89
- return new s(t);
88
+ function h(e) {
89
+ return new o(e);
90
90
  }
91
91
  export {
92
- o as Err,
93
- u as IllegalStateError,
94
- s as Ok,
92
+ u as Err,
93
+ s as IllegalStateError,
94
+ o as Ok,
95
95
  d as err,
96
96
  h as ok
97
97
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "resumon",
3
3
  "type": "module",
4
- "version": "2.0.12",
4
+ "version": "2.0.13",
5
5
  "description": "A tiny TypeScript result monad.",
6
6
  "author": {
7
7
  "name": "Jan Müller",
@@ -36,12 +36,12 @@
36
36
  "dist"
37
37
  ],
38
38
  "devDependencies": {
39
- "@types/node": "22.10.7",
39
+ "@types/node": "22.13.0",
40
40
  "@vue/component-compiler-utils": "3.3.0",
41
41
  "typescript": "5.7.3",
42
- "vite": "6.0.7",
42
+ "vite": "6.0.11",
43
43
  "@yeger/tsconfig": "2.0.9",
44
- "vite-plugin-lib": "2.1.4"
44
+ "vite-plugin-lib": "2.1.5"
45
45
  },
46
46
  "publishConfig": {
47
47
  "access": "public"