context-scoped-state 0.0.13 → 0.0.14

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/README.md CHANGED
@@ -221,6 +221,38 @@ function App() {
221
221
  }
222
222
  ```
223
223
 
224
+ ### Optional Store Access
225
+
226
+ Sometimes a component needs to work both inside and outside a store provider. Instead of throwing an error, `useStore.optional()` returns `undefined` when no provider is found:
227
+
228
+ ```tsx
229
+ function UserName({ userId }: { userId: string }) {
230
+ const store = useUserStore.optional();
231
+
232
+ if (!store) {
233
+ return <span>{userId}</span>;
234
+ }
235
+
236
+ return <span>{store.state.users.get(userId) ?? userId}</span>;
237
+ }
238
+
239
+ // Works inside a provider — shows resolved user name
240
+ function Dashboard() {
241
+ return (
242
+ <useUserStore.Context>
243
+ <UserName userId="42" />
244
+ </useUserStore.Context>
245
+ );
246
+ }
247
+
248
+ // Also works without a provider — falls back to showing the raw ID
249
+ function SimpleList() {
250
+ return <UserName userId="42" />;
251
+ }
252
+ ```
253
+
254
+ This is useful for shared components that are rendered in different parts of your app, where a provider may or may not be present.
255
+
224
256
  ## Why context-scoped-state Over Other Libraries?
225
257
 
226
258
  | Feature | context-scoped-state | Redux | Zustand |
@@ -351,6 +383,24 @@ Both `Context` and `MockContext` accept props, but they work differently:
351
383
 
352
384
  **Debuggability:** In production code, `getInitialState()` is always called. You can set a breakpoint there to see exactly how initial state is computed. With `MockContext`, the state is set directly for test convenience.
353
385
 
386
+ ### `useStore()` vs `useStore.optional()`
387
+
388
+ By default, calling the hook outside a provider throws an error:
389
+
390
+ ```tsx
391
+ const store = useCounterStore(); // Throws if no <useCounterStore.Context> above
392
+ ```
393
+
394
+ This is intentional — it catches missing providers early during development. Most components _require_ the store to function, so a loud failure is better than a silent `undefined`.
395
+
396
+ For components that genuinely need to work with or without a provider, use `.optional()`:
397
+
398
+ ```tsx
399
+ const store = useCounterStore.optional(); // Returns undefined if no provider
400
+ ```
401
+
402
+ **Why two variants instead of a config flag?** Type safety. `useStore()` returns `TWithState` — you can use the store directly without null checks. `useStore.optional()` returns `TWithState | undefined` — TypeScript forces you to handle the `undefined` case. This keeps the common path clean while making the optional path explicitly safe.
403
+
354
404
  ### Why `getInitialState()` Method Instead of a Property?
355
405
 
356
406
  Instead of:
package/dist/index.js CHANGED
@@ -1,22 +1,22 @@
1
1
  import { jsx as C } from "react/jsx-runtime";
2
- import h, { useSyncExternalStore as H } from "react";
3
- var m = function(e, r) {
4
- return m = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(t, n) {
2
+ import f, { useSyncExternalStore as $ } from "react";
3
+ var w = function(e, r) {
4
+ return w = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(t, n) {
5
5
  t.__proto__ = n;
6
6
  } || function(t, n) {
7
7
  for (var o in n) Object.prototype.hasOwnProperty.call(n, o) && (t[o] = n[o]);
8
- }, m(e, r);
8
+ }, w(e, r);
9
9
  };
10
10
  function v(e, r) {
11
11
  if (typeof r != "function" && r !== null)
12
12
  throw new TypeError("Class extends value " + String(r) + " is not a constructor or null");
13
- m(e, r);
13
+ w(e, r);
14
14
  function t() {
15
15
  this.constructor = e;
16
16
  }
17
17
  e.prototype = r === null ? Object.create(r) : (t.prototype = r.prototype, new t());
18
18
  }
19
- function w(e) {
19
+ function E(e) {
20
20
  var r = typeof Symbol == "function" && Symbol.iterator, t = r && e[r], n = 0;
21
21
  if (t) return t.call(e);
22
22
  if (e && typeof e.length == "number") return {
@@ -26,7 +26,7 @@ function w(e) {
26
26
  };
27
27
  throw new TypeError(r ? "Object is not iterable." : "Symbol.iterator is not defined.");
28
28
  }
29
- function x(e, r) {
29
+ function g(e, r) {
30
30
  var t = typeof Symbol == "function" && e[Symbol.iterator];
31
31
  if (!t) return e;
32
32
  var n = t.call(e), o, i = [], s;
@@ -43,7 +43,7 @@ function x(e, r) {
43
43
  }
44
44
  return i;
45
45
  }
46
- function E(e, r, t) {
46
+ function x(e, r, t) {
47
47
  if (t || arguments.length === 2) for (var n = 0, o = r.length, i; n < o; n++)
48
48
  (i || !(n in r)) && (i || (i = Array.prototype.slice.call(r, 0, n)), i[n] = r[n]);
49
49
  return e.concat(i || Array.prototype.slice.call(r));
@@ -57,7 +57,7 @@ function M(e) {
57
57
  }, t = e(r);
58
58
  return t.prototype = Object.create(Error.prototype), t.prototype.constructor = t, t;
59
59
  }
60
- var _ = M(function(e) {
60
+ var m = M(function(e) {
61
61
  return function(t) {
62
62
  e(this), this.message = t ? t.length + ` errors occurred during unsubscription:
63
63
  ` + t.map(function(n, o) {
@@ -66,13 +66,13 @@ var _ = M(function(e) {
66
66
  `) : "", this.name = "UnsubscriptionError", this.errors = t;
67
67
  };
68
68
  });
69
- function g(e, r) {
69
+ function O(e, r) {
70
70
  if (e) {
71
71
  var t = e.indexOf(r);
72
72
  0 <= t && e.splice(t, 1);
73
73
  }
74
74
  }
75
- var S = (function() {
75
+ var _ = (function() {
76
76
  function e(r) {
77
77
  this.initialTeardown = r, this.closed = !1, this._parentage = null, this._finalizers = null;
78
78
  }
@@ -84,9 +84,9 @@ var S = (function() {
84
84
  if (s)
85
85
  if (this._parentage = null, Array.isArray(s))
86
86
  try {
87
- for (var u = w(s), c = u.next(); !c.done; c = u.next()) {
88
- var f = c.value;
89
- f.remove(this);
87
+ for (var u = E(s), c = u.next(); !c.done; c = u.next()) {
88
+ var p = c.value;
89
+ p.remove(this);
90
90
  }
91
91
  } catch (a) {
92
92
  r = { error: a };
@@ -99,37 +99,37 @@ var S = (function() {
99
99
  }
100
100
  else
101
101
  s.remove(this);
102
- var j = this.initialTeardown;
103
- if (l(j))
102
+ var b = this.initialTeardown;
103
+ if (l(b))
104
104
  try {
105
- j();
105
+ b();
106
106
  } catch (a) {
107
- i = a instanceof _ ? a.errors : [a];
107
+ i = a instanceof m ? a.errors : [a];
108
108
  }
109
109
  var P = this._finalizers;
110
110
  if (P) {
111
111
  this._finalizers = null;
112
112
  try {
113
- for (var b = w(P), p = b.next(); !p.done; p = b.next()) {
114
- var V = p.value;
113
+ for (var d = E(P), h = d.next(); !h.done; h = d.next()) {
114
+ var H = h.value;
115
115
  try {
116
- A(V);
116
+ A(H);
117
117
  } catch (a) {
118
- i = i ?? [], a instanceof _ ? i = E(E([], x(i)), x(a.errors)) : i.push(a);
118
+ i = i ?? [], a instanceof m ? i = x(x([], g(i)), g(a.errors)) : i.push(a);
119
119
  }
120
120
  }
121
121
  } catch (a) {
122
122
  n = { error: a };
123
123
  } finally {
124
124
  try {
125
- p && !p.done && (o = b.return) && o.call(b);
125
+ h && !h.done && (o = d.return) && o.call(d);
126
126
  } finally {
127
127
  if (n) throw n.error;
128
128
  }
129
129
  }
130
130
  }
131
131
  if (i)
132
- throw new _(i);
132
+ throw new m(i);
133
133
  }
134
134
  }, e.prototype.add = function(r) {
135
135
  var t;
@@ -152,52 +152,52 @@ var S = (function() {
152
152
  this._parentage = Array.isArray(t) ? (t.push(r), t) : t ? [t, r] : r;
153
153
  }, e.prototype._removeParent = function(r) {
154
154
  var t = this._parentage;
155
- t === r ? this._parentage = null : Array.isArray(t) && g(t, r);
155
+ t === r ? this._parentage = null : Array.isArray(t) && O(t, r);
156
156
  }, e.prototype.remove = function(r) {
157
157
  var t = this._finalizers;
158
- t && g(t, r), r instanceof e && r._removeParent(this);
158
+ t && O(t, r), r instanceof e && r._removeParent(this);
159
159
  }, e.EMPTY = (function() {
160
160
  var r = new e();
161
161
  return r.closed = !0, r;
162
162
  })(), e;
163
- })(), Y = S.EMPTY;
163
+ })(), Y = _.EMPTY;
164
164
  function R(e) {
165
- return e instanceof S || e && "closed" in e && l(e.remove) && l(e.add) && l(e.unsubscribe);
165
+ return e instanceof _ || e && "closed" in e && l(e.remove) && l(e.add) && l(e.unsubscribe);
166
166
  }
167
167
  function A(e) {
168
168
  l(e) ? e() : e.unsubscribe();
169
169
  }
170
- var $ = {
170
+ var W = {
171
171
  Promise: void 0
172
- }, W = {
172
+ }, q = {
173
173
  setTimeout: function(e, r) {
174
174
  for (var t = [], n = 2; n < arguments.length; n++)
175
175
  t[n - 2] = arguments[n];
176
- return setTimeout.apply(void 0, E([e, r], x(t)));
176
+ return setTimeout.apply(void 0, x([e, r], g(t)));
177
177
  },
178
178
  clearTimeout: function(e) {
179
179
  return clearTimeout(e);
180
180
  },
181
181
  delegate: void 0
182
182
  };
183
- function q(e) {
184
- W.setTimeout(function() {
183
+ function D(e) {
184
+ q.setTimeout(function() {
185
185
  throw e;
186
186
  });
187
187
  }
188
188
  function T() {
189
189
  }
190
- function y(e) {
190
+ function S(e) {
191
191
  e();
192
192
  }
193
193
  var F = (function(e) {
194
194
  v(r, e);
195
195
  function r(t) {
196
196
  var n = e.call(this) || this;
197
- return n.isStopped = !1, t ? (n.destination = t, R(t) && t.add(n)) : n.destination = J, n;
197
+ return n.isStopped = !1, t ? (n.destination = t, R(t) && t.add(n)) : n.destination = K, n;
198
198
  }
199
199
  return r.create = function(t, n, o) {
200
- return new O(t, n, o);
200
+ return new j(t, n, o);
201
201
  }, r.prototype.next = function(t) {
202
202
  this.isStopped || this._next(t);
203
203
  }, r.prototype.error = function(t) {
@@ -221,7 +221,7 @@ var F = (function(e) {
221
221
  this.unsubscribe();
222
222
  }
223
223
  }, r;
224
- })(S), D = (function() {
224
+ })(_), G = (function() {
225
225
  function e(r) {
226
226
  this.partialObserver = r;
227
227
  }
@@ -231,7 +231,7 @@ var F = (function(e) {
231
231
  try {
232
232
  t.next(r);
233
233
  } catch (n) {
234
- d(n);
234
+ y(n);
235
235
  }
236
236
  }, e.prototype.error = function(r) {
237
237
  var t = this.partialObserver;
@@ -239,20 +239,20 @@ var F = (function(e) {
239
239
  try {
240
240
  t.error(r);
241
241
  } catch (n) {
242
- d(n);
242
+ y(n);
243
243
  }
244
244
  else
245
- d(r);
245
+ y(r);
246
246
  }, e.prototype.complete = function() {
247
247
  var r = this.partialObserver;
248
248
  if (r.complete)
249
249
  try {
250
250
  r.complete();
251
251
  } catch (t) {
252
- d(t);
252
+ y(t);
253
253
  }
254
254
  }, e;
255
- })(), O = (function(e) {
255
+ })(), j = (function(e) {
256
256
  v(r, e);
257
257
  function r(t, n, o) {
258
258
  var i = e.call(this) || this, s;
@@ -260,29 +260,29 @@ var F = (function(e) {
260
260
  next: t ?? void 0,
261
261
  error: n ?? void 0,
262
262
  complete: o ?? void 0
263
- } : s = t, i.destination = new D(s), i;
263
+ } : s = t, i.destination = new G(s), i;
264
264
  }
265
265
  return r;
266
266
  })(F);
267
- function d(e) {
268
- q(e);
267
+ function y(e) {
268
+ D(e);
269
269
  }
270
- function G(e) {
270
+ function J(e) {
271
271
  throw e;
272
272
  }
273
- var J = {
273
+ var K = {
274
274
  closed: !0,
275
275
  next: T,
276
- error: G,
276
+ error: J,
277
277
  complete: T
278
- }, K = (function() {
278
+ }, L = (function() {
279
279
  return typeof Symbol == "function" && Symbol.observable || "@@observable";
280
280
  })();
281
- function L(e) {
281
+ function Q(e) {
282
282
  return e;
283
283
  }
284
- function Q(e) {
285
- return e.length === 0 ? L : e.length === 1 ? e[0] : function(t) {
284
+ function X(e) {
285
+ return e.length === 0 ? Q : e.length === 1 ? e[0] : function(t) {
286
286
  return e.reduce(function(n, o) {
287
287
  return o(n);
288
288
  }, t);
@@ -296,8 +296,8 @@ var I = (function() {
296
296
  var t = new e();
297
297
  return t.source = this, t.operator = r, t;
298
298
  }, e.prototype.subscribe = function(r, t, n) {
299
- var o = this, i = Z(r) ? r : new O(r, t, n);
300
- return y(function() {
299
+ var o = this, i = z(r) ? r : new j(r, t, n);
300
+ return S(function() {
301
301
  var s = o, u = s.operator, c = s.source;
302
302
  i.add(u ? u.call(i, c) : c ? o._subscribe(i) : o._trySubscribe(i));
303
303
  }), i;
@@ -310,7 +310,7 @@ var I = (function() {
310
310
  }, e.prototype.forEach = function(r, t) {
311
311
  var n = this;
312
312
  return t = k(t), new t(function(o, i) {
313
- var s = new O({
313
+ var s = new j({
314
314
  next: function(u) {
315
315
  try {
316
316
  r(u);
@@ -326,12 +326,12 @@ var I = (function() {
326
326
  }, e.prototype._subscribe = function(r) {
327
327
  var t;
328
328
  return (t = this.source) === null || t === void 0 ? void 0 : t.subscribe(r);
329
- }, e.prototype[K] = function() {
329
+ }, e.prototype[L] = function() {
330
330
  return this;
331
331
  }, e.prototype.pipe = function() {
332
332
  for (var r = [], t = 0; t < arguments.length; t++)
333
333
  r[t] = arguments[t];
334
- return Q(r)(this);
334
+ return X(r)(this);
335
335
  }, e.prototype.toPromise = function(r) {
336
336
  var t = this;
337
337
  return r = k(r), new r(function(n, o) {
@@ -350,15 +350,15 @@ var I = (function() {
350
350
  })();
351
351
  function k(e) {
352
352
  var r;
353
- return (r = e ?? $.Promise) !== null && r !== void 0 ? r : Promise;
353
+ return (r = e ?? W.Promise) !== null && r !== void 0 ? r : Promise;
354
354
  }
355
- function X(e) {
355
+ function Z(e) {
356
356
  return e && l(e.next) && l(e.error) && l(e.complete);
357
357
  }
358
- function Z(e) {
359
- return e && e instanceof F || X(e) && R(e);
358
+ function z(e) {
359
+ return e && e instanceof F || Z(e) && R(e);
360
360
  }
361
- var z = M(function(e) {
361
+ var V = M(function(e) {
362
362
  return function() {
363
363
  e(this), this.name = "ObjectUnsubscribedError", this.message = "object unsubscribed";
364
364
  };
@@ -373,20 +373,20 @@ var z = M(function(e) {
373
373
  return n.operator = t, n;
374
374
  }, r.prototype._throwIfClosed = function() {
375
375
  if (this.closed)
376
- throw new z();
376
+ throw new V();
377
377
  }, r.prototype.next = function(t) {
378
378
  var n = this;
379
- y(function() {
379
+ S(function() {
380
380
  var o, i;
381
381
  if (n._throwIfClosed(), !n.isStopped) {
382
382
  n.currentObservers || (n.currentObservers = Array.from(n.observers));
383
383
  try {
384
- for (var s = w(n.currentObservers), u = s.next(); !u.done; u = s.next()) {
384
+ for (var s = E(n.currentObservers), u = s.next(); !u.done; u = s.next()) {
385
385
  var c = u.value;
386
386
  c.next(t);
387
387
  }
388
- } catch (f) {
389
- o = { error: f };
388
+ } catch (p) {
389
+ o = { error: p };
390
390
  } finally {
391
391
  try {
392
392
  u && !u.done && (i = s.return) && i.call(s);
@@ -398,7 +398,7 @@ var z = M(function(e) {
398
398
  });
399
399
  }, r.prototype.error = function(t) {
400
400
  var n = this;
401
- y(function() {
401
+ S(function() {
402
402
  if (n._throwIfClosed(), !n.isStopped) {
403
403
  n.hasError = n.isStopped = !0, n.thrownError = t;
404
404
  for (var o = n.observers; o.length; )
@@ -407,7 +407,7 @@ var z = M(function(e) {
407
407
  });
408
408
  }, r.prototype.complete = function() {
409
409
  var t = this;
410
- y(function() {
410
+ S(function() {
411
411
  if (t._throwIfClosed(), !t.isStopped) {
412
412
  t.isStopped = !0;
413
413
  for (var n = t.observers; n.length; )
@@ -429,8 +429,8 @@ var z = M(function(e) {
429
429
  return this._throwIfClosed(), this._checkFinalizedStatuses(t), this._innerSubscribe(t);
430
430
  }, r.prototype._innerSubscribe = function(t) {
431
431
  var n = this, o = this, i = o.hasError, s = o.isStopped, u = o.observers;
432
- return i || s ? Y : (this.currentObservers = null, u.push(t), new S(function() {
433
- n.currentObservers = null, g(u, t);
432
+ return i || s ? Y : (this.currentObservers = null, u.push(t), new _(function() {
433
+ n.currentObservers = null, O(u, t);
434
434
  }));
435
435
  }, r.prototype._checkFinalizedStatuses = function(t) {
436
436
  var n = this, o = n.hasError, i = n.thrownError, s = n.isStopped;
@@ -509,12 +509,29 @@ class et {
509
509
  function nt(e) {
510
510
  const r = class extends e {
511
511
  state;
512
- }, t = h.createContext(
512
+ }, t = f.createContext(
513
513
  void 0
514
514
  );
515
- function n() {
516
- const o = h.useContext(t);
517
- if (!o)
515
+ function n(i) {
516
+ const s = f.useCallback(
517
+ (u) => {
518
+ if (!i) return () => {
519
+ };
520
+ const c = i.state$().subscribe(u);
521
+ return () => c.unsubscribe();
522
+ },
523
+ [i]
524
+ );
525
+ if ($(
526
+ s,
527
+ () => i?.getState(),
528
+ () => i?.getState()
529
+ ), !!i)
530
+ return i.state = i.getState(), i;
531
+ }
532
+ function o() {
533
+ const i = f.useContext(t), s = n(i);
534
+ if (!s)
518
535
  throw new Error(
519
536
  `Store hook used outside of its Context provider.
520
537
 
@@ -526,42 +543,33 @@ Then wrap your component with:
526
543
  <YourComponent />
527
544
  </useYourStore.Context>`
528
545
  );
529
- const i = h.useCallback(
530
- (u) => {
531
- const c = o.state$().subscribe(u);
532
- return () => c.unsubscribe();
533
- },
534
- [o]
535
- ), s = H(
536
- i,
537
- () => o.getState(),
538
- () => o.getState()
539
- // getServerSnapshot for SSR
540
- );
541
- return o.state = s, o;
546
+ return s;
542
547
  }
543
- return n.Context = function({
544
- children: i,
545
- value: s
548
+ return o.optional = function() {
549
+ const s = f.useContext(t);
550
+ return n(s);
551
+ }, o.Context = function({
552
+ children: s,
553
+ value: u
546
554
  }) {
547
- const [u] = h.useState(() => new r(s));
548
- return /* @__PURE__ */ C(t.Provider, { value: u, children: i });
549
- }, n.MockContext = function({
550
- children: i,
551
- state: s
555
+ const [c] = f.useState(() => new r(u));
556
+ return /* @__PURE__ */ C(t.Provider, { value: c, children: s });
557
+ }, o.MockContext = function({
558
+ children: s,
559
+ state: u
552
560
  }) {
553
- const u = () => {
554
- if (s === void 0)
561
+ const c = () => {
562
+ if (u === void 0)
555
563
  return new r();
556
- const f = class extends r {
564
+ const b = class extends r {
557
565
  getInitialState() {
558
- return s;
566
+ return u;
559
567
  }
560
568
  };
561
- return new f();
562
- }, c = h.useRef(u());
563
- return /* @__PURE__ */ C(t.Provider, { value: c.current, children: i });
564
- }, n;
569
+ return new b();
570
+ }, p = f.useRef(c());
571
+ return /* @__PURE__ */ C(t.Provider, { value: p.current, children: s });
572
+ }, o;
565
573
  }
566
574
  export {
567
575
  et as Store,
@@ -4,6 +4,9 @@ declare function createStoreHook<T extends Store<any, any>>(storeClass: new (con
4
4
  (): T & {
5
5
  readonly state: ReturnType<T["getState"]>;
6
6
  };
7
+ optional(): (T & {
8
+ readonly state: ReturnType<T["getState"]>;
9
+ }) | undefined;
7
10
  Context({ children, value, }: {
8
11
  children: React.ReactNode;
9
12
  value?: T extends Store<any, infer C> ? C : never;
@@ -1 +1 @@
1
- {"version":3,"file":"createStore.d.ts","sourceRoot":"","sources":["../../src/lib/createStore.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA+B,MAAM,OAAO,CAAC;AACpD,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAErC,iBAAS,eAAe,CAAC,CAAC,SAAS,KAAK,CAAC,GAAG,EAAE,GAAG,CAAC,EAChD,UAAU,EAAE,KAAK,YAAY,CAAC,EAAE,GAAG,KAAK,CAAC;;;;kCAyDtC;QACD,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;QAC1B,KAAK,CAAC,6BAvD2C,CAAC,cAuDzB;KAC1B;sCAWE;QACD,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;QAC1B,KAAK,CAAC,4BAAY;KACnB;EAwBF;AACD,OAAO,EAAE,eAAe,EAAE,CAAC"}
1
+ {"version":3,"file":"createStore.d.ts","sourceRoot":"","sources":["../../src/lib/createStore.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA+B,MAAM,OAAO,CAAC;AACpD,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAErC,iBAAS,eAAe,CAAC,CAAC,SAAS,KAAK,CAAC,GAAG,EAAE,GAAG,CAAC,EAChD,UAAU,EAAE,KAAK,YAAY,CAAC,EAAE,GAAG,KAAK,CAAC;;;;gBAgEQ;;SAAa,SAAS;kCAQpE;QACD,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;QAC1B,KAAK,CAAC,6BAtE2C,CAAC,cAsEzB;KAC1B;sCAWE;QACD,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;QAC1B,KAAK,CAAC,4BAAY;KACnB;EAwBF;AACD,OAAO,EAAE,eAAe,EAAE,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "context-scoped-state",
3
- "version": "0.0.13",
3
+ "version": "0.0.14",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "repository": {