atom.io 0.6.4 → 0.6.5

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "atom.io",
3
- "version": "0.6.4",
3
+ "version": "0.6.5",
4
4
  "description": "Reactive state graph for React, Preact, and vanilla",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -93,7 +93,6 @@
93
93
  }
94
94
  },
95
95
  "dependencies": {
96
- "fp-ts": "2.16.0",
97
96
  "hamt_plus": "1.0.2"
98
97
  },
99
98
  "devDependencies": {
@@ -107,7 +106,7 @@
107
106
  "happy-dom": "10.5.1",
108
107
  "react": "18.2.0",
109
108
  "react-dom": "18.2.0",
110
- "react-router-dom": "6.14.1",
109
+ "react-router-dom": "6.14.2",
111
110
  "socket.io": "4.7.1",
112
111
  "socket.io-client": "4.7.1",
113
112
  "tmp": "0.2.1",
@@ -1,5 +1,3 @@
1
- import { isString } from "fp-ts/lib/string"
2
-
3
1
  import { isArray } from "~/packages/anvl/src/array"
4
2
  import { parseJson, stringifyJson } from "~/packages/anvl/src/json"
5
3
 
@@ -10,7 +8,9 @@ export const persistStringSetAtom = persistAtom<Set<string>>(localStorage)({
10
8
  parse: (string) => {
11
9
  try {
12
10
  const json = parseJson(string)
13
- const array = isArray(isString)(json) ? json : []
11
+ const array = isArray((v): v is string => typeof v === `string`)(json)
12
+ ? json
13
+ : []
14
14
  return new Set(array)
15
15
  } catch (thrown) {
16
16
  console.error(`Error parsing spaceIndexState from localStorage`)
@@ -1,5 +1,3 @@
1
- import { isNumber } from "fp-ts/lib/number"
2
-
3
1
  import { Join } from "~/packages/anvl/src/join"
4
2
  import { parseJson, stringifyJson } from "~/packages/anvl/src/json"
5
3
  import { hasExactProperties } from "~/packages/anvl/src/object"
@@ -31,7 +29,9 @@ export const makeSpaceLayoutState = (
31
29
  try {
32
30
  const json = parseJson(string)
33
31
  const join = Join.fromJSON(json, {
34
- isContent: hasExactProperties({ size: isNumber }),
32
+ isContent: hasExactProperties({
33
+ size: (v): v is number => typeof v === `number`,
34
+ }),
35
35
  from: `parent`,
36
36
  to: `child`,
37
37
  })