atom.io 0.28.2 → 0.29.1

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.
@@ -1,6 +1,6 @@
1
1
  import '../../../dist/chunk-XWL6SNVU.js';
2
2
  import { Subject } from 'atom.io/internal';
3
- import { stringifyJson, parseJson } from 'atom.io/json';
3
+ import { stringifyJson } from 'atom.io/json';
4
4
 
5
5
  var SetRTX = class _SetRTX extends Set {
6
6
  mode = `record`;
@@ -111,13 +111,13 @@ var SetRTX = class _SetRTX extends Set {
111
111
  const value = update.substring(typeValueBreak + 1);
112
112
  switch (type) {
113
113
  case `add`:
114
- this.add(parseJson(value));
114
+ this.add(JSON.parse(value));
115
115
  break;
116
116
  case `clear`:
117
117
  this.clear();
118
118
  break;
119
119
  case `del`:
120
- this.delete(parseJson(value));
120
+ this.delete(JSON.parse(value));
121
121
  break;
122
122
  case `tx`:
123
123
  for (const subUpdate of value.split(`;`)) {
@@ -177,10 +177,10 @@ var SetRTX = class _SetRTX extends Set {
177
177
  const value = update.substring(breakpoint + 1);
178
178
  switch (type) {
179
179
  case `add`:
180
- this.delete(parseJson(value));
180
+ this.delete(JSON.parse(value));
181
181
  break;
182
182
  case `del`:
183
- this.add(parseJson(value));
183
+ this.add(JSON.parse(value));
184
184
  break;
185
185
  case `clear`: {
186
186
  const values = JSON.parse(value);
@@ -1,7 +1,7 @@
1
1
  import type { Lineage, Transceiver, TransceiverMode } from "atom.io/internal"
2
2
  import { Subject } from "atom.io/internal"
3
- import type { Json, primitive, stringified } from "atom.io/json"
4
- import { parseJson, stringifyJson } from "atom.io/json"
3
+ import type { Json, primitive } from "atom.io/json"
4
+ import { stringifyJson } from "atom.io/json"
5
5
 
6
6
  export type SetUpdate =
7
7
  | `add:${string}`
@@ -146,13 +146,13 @@ export class SetRTX<P extends primitive>
146
146
  const value = update.substring(typeValueBreak + 1)
147
147
  switch (type) {
148
148
  case `add`:
149
- this.add(parseJson(value as stringified<P>))
149
+ this.add(JSON.parse(value))
150
150
  break
151
151
  case `clear`:
152
152
  this.clear()
153
153
  break
154
154
  case `del`:
155
- this.delete(parseJson(value as stringified<P>))
155
+ this.delete(JSON.parse(value))
156
156
  break
157
157
  case `tx`:
158
158
  for (const subUpdate of value.split(`;`)) {
@@ -215,10 +215,10 @@ export class SetRTX<P extends primitive>
215
215
  const value = update.substring(breakpoint + 1)
216
216
  switch (type) {
217
217
  case `add`:
218
- this.delete(parseJson(value as stringified<P>))
218
+ this.delete(JSON.parse(value))
219
219
  break
220
220
  case `del`:
221
- this.add(parseJson(value as stringified<P>))
221
+ this.add(JSON.parse(value))
222
222
  break
223
223
  case `clear`: {
224
224
  const values = JSON.parse(value) as P[]