functionalscript 0.0.490 → 0.0.492

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.
@@ -72,17 +72,17 @@ const main = input => {
72
72
  break
73
73
  }
74
74
  case 'object': {
75
- /** @type {(k: readonly[string|number, unknown]) => (state: State<T>) => State<T>} */
76
- const f = ([k, v]) => ([time, state]) => {
77
- state = log(`${i}${k}:`)(state);
78
- [time, state] = next(v)([time, state])
79
- return [time, state]
80
- }
81
- const foldF = fold(f)([time, state])
82
- if (v instanceof Array) {
83
- [time, state] = foldF(list.entries(v))
84
- } else if (v !== null) {
85
- [time, state] = foldF(Object.entries(v))
75
+ if (v !== null) {
76
+ /** @type {(k: readonly[string|number, unknown]) => (state: State<T>) => State<T>} */
77
+ const f = ([k, v]) => ([time, state]) => {
78
+ state = log(`${i}${k}:`)(state);
79
+ [time, state] = next(v)([time, state])
80
+ return [time, state]
81
+ }
82
+ [time, state] = fold
83
+ (f)
84
+ ([time, state])
85
+ (v instanceof Array ? list.entries(v) : Object.entries(v))
86
86
  }
87
87
  break
88
88
  }
package/dev/test.mjs CHANGED
@@ -13,8 +13,6 @@ const performanceNow = state => [performance.now(), state]
13
13
  const main = async() => {
14
14
  const moduleMap = await loadModuleMap()
15
15
 
16
- // await import(self.Deno ? 'https://deno.land/std/node/fs/promises.ts' : 'node:fs/promises')
17
-
18
16
  /** @type {any} */
19
17
  const f = moduleMap['./dev/test/module.f.cjs'].exports
20
18
  f({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "functionalscript",
3
- "version": "0.0.490",
3
+ "version": "0.0.492",
4
4
  "description": "FunctionalScript is a functional subset of JavaScript",
5
5
  "main": "module.f.cjs",
6
6
  "scripts": {
@@ -30,7 +30,7 @@
30
30
  },
31
31
  "homepage": "https://github.com/functionalscript/functionalscript#readme",
32
32
  "devDependencies": {
33
- "@types/node": "^18.11.9",
34
- "typescript": "^4.9.3"
33
+ "@types/node": "^18.11.15",
34
+ "typescript": "^4.9.4"
35
35
  }
36
36
  }