ctx-core 5.26.0 → 5.28.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.
- package/all/index.d.ts +1 -0
- package/all/index.js +1 -0
- package/all/run_or_val/index.d.ts +4 -0
- package/all/run_or_val/index.js +7 -0
- package/all/run_or_val/index.test.ts +15 -0
- package/function/index.d.ts +1 -0
- package/function/index.js +1 -0
- package/package.json +4 -4
- package/rmemo/index.d.ts +1 -0
- package/rmemo/index.js +2 -1
- package/run/index.d.ts +2 -1
- package/run/index.js +2 -1
package/all/index.d.ts
CHANGED
|
@@ -371,6 +371,7 @@ export * from './rmemo/index.js'
|
|
|
371
371
|
export * from './rmemo__wait/index.js'
|
|
372
372
|
export * from './round/index.js'
|
|
373
373
|
export * from './run/index.js'
|
|
374
|
+
export * from './run_or_val/index.js'
|
|
374
375
|
export * from './run_pipe/index.js'
|
|
375
376
|
export * from './scalar__matrix__multiply/index.js'
|
|
376
377
|
export * from './searchParams_o/index.js'
|
package/all/index.js
CHANGED
|
@@ -371,6 +371,7 @@ export * from './rmemo/index.js'
|
|
|
371
371
|
export * from './rmemo__wait/index.js'
|
|
372
372
|
export * from './round/index.js'
|
|
373
373
|
export * from './run/index.js'
|
|
374
|
+
export * from './run_or_val/index.js'
|
|
374
375
|
export * from './run_pipe/index.js'
|
|
375
376
|
export * from './scalar__matrix__multiply/index.js'
|
|
376
377
|
export * from './searchParams_o/index.js'
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { test } from 'uvu'
|
|
2
|
+
import { equal } from 'uvu/assert'
|
|
3
|
+
import { run_or_val_ } from './index.js'
|
|
4
|
+
test('run_or_val_', ()=>{
|
|
5
|
+
equal(run_or_val_(1), 1)
|
|
6
|
+
equal(run_or_val_(null), null)
|
|
7
|
+
equal(run_or_val_(()=>123), 123)
|
|
8
|
+
equal(run_or_val_(()=>null), null)
|
|
9
|
+
equal(run_or_val_(1, 'arg0', 'arg1'), 1)
|
|
10
|
+
equal(
|
|
11
|
+
run_or_val_(
|
|
12
|
+
(...arg_a)=>arg_a, 'arg0', 'arg1'),
|
|
13
|
+
['arg0', 'arg1'])
|
|
14
|
+
})
|
|
15
|
+
test.run()
|
package/function/index.d.ts
CHANGED
|
@@ -80,6 +80,7 @@ export * from '../all/resolver_curry/index.js'
|
|
|
80
80
|
export * from '../all/right_and/index.js'
|
|
81
81
|
export * from '../all/right_or/index.js'
|
|
82
82
|
export * from '../all/run/index.js'
|
|
83
|
+
export * from '../all/run_or_val/index.js'
|
|
83
84
|
export * from '../all/run_pipe/index.js'
|
|
84
85
|
export * from '../all/sleep/index.js'
|
|
85
86
|
export * from '../all/slice_arg_a/index.js'
|
package/function/index.js
CHANGED
|
@@ -80,6 +80,7 @@ export * from '../all/resolver_curry/index.js'
|
|
|
80
80
|
export * from '../all/right_and/index.js'
|
|
81
81
|
export * from '../all/right_or/index.js'
|
|
82
82
|
export * from '../all/run/index.js'
|
|
83
|
+
export * from '../all/run_or_val/index.js'
|
|
83
84
|
export * from '../all/run_pipe/index.js'
|
|
84
85
|
export * from '../all/sleep/index.js'
|
|
85
86
|
export * from '../all/slice_arg_a/index.js'
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ctx-core",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.28.1",
|
|
4
4
|
"description": "ctx-core core library",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ctx-core",
|
|
@@ -134,15 +134,15 @@
|
|
|
134
134
|
"./package.json": "./package.json"
|
|
135
135
|
},
|
|
136
136
|
"devDependencies": {
|
|
137
|
-
"@arethetypeswrong/cli": "^0.13.
|
|
137
|
+
"@arethetypeswrong/cli": "^0.13.6",
|
|
138
138
|
"@ctx-core/preprocess": "^0.1.1",
|
|
139
139
|
"@size-limit/preset-small-lib": "^11.0.2",
|
|
140
140
|
"@types/node": "^20.11.5",
|
|
141
141
|
"@types/sinon": "^17.0.3",
|
|
142
142
|
"c8": "^9.1.0",
|
|
143
143
|
"check-dts": "^0.7.2",
|
|
144
|
-
"esbuild": "^0.19.
|
|
145
|
-
"esmock": "^2.6.
|
|
144
|
+
"esbuild": "^0.19.12",
|
|
145
|
+
"esmock": "^2.6.3",
|
|
146
146
|
"sinon": "^17.0.1",
|
|
147
147
|
"size-limit": "^11.0.2",
|
|
148
148
|
"tsx": "^4.7.0",
|
package/rmemo/index.d.ts
CHANGED
|
@@ -13,6 +13,7 @@ export * from '../all/nullish__none/index.js'
|
|
|
13
13
|
export * from '../all/rmemo/index.js'
|
|
14
14
|
export * from '../all/rmemo__wait/index.js'
|
|
15
15
|
export * from '../all/run/index.js'
|
|
16
|
+
export * from '../all/run_or_val/index.js'
|
|
16
17
|
export * from '../all/sleep/index.js'
|
|
17
18
|
export * from '../all/timeout/index.js'
|
|
18
19
|
export * from '../all/tup/index.js'
|
package/rmemo/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { memo__bind,
|
|
1
|
+
import { memo__bind, rmemo__off, rmemo__on, rmemo__add } from './/index.js'
|
|
2
2
|
export { memo__bind as _, memo__bind as bind, rmemo__off as off, rmemo__on as on, rmemo__add as subscribe }
|
|
3
3
|
export * from '../all/be/index.js'
|
|
4
4
|
export * from '../all/be_/index.js'
|
|
@@ -13,6 +13,7 @@ export * from '../all/nullish__none/index.js'
|
|
|
13
13
|
export * from '../all/rmemo/index.js'
|
|
14
14
|
export * from '../all/rmemo__wait/index.js'
|
|
15
15
|
export * from '../all/run/index.js'
|
|
16
|
+
export * from '../all/run_or_val/index.js'
|
|
16
17
|
export * from '../all/sleep/index.js'
|
|
17
18
|
export * from '../all/timeout/index.js'
|
|
18
19
|
export * from '../all/tup/index.js'
|
package/run/index.d.ts
CHANGED
|
@@ -8,5 +8,6 @@ export * from '../all/bind_map_call/index.js'
|
|
|
8
8
|
export * from '../all/call/index.js'
|
|
9
9
|
export * from '../all/call_fn_a/index.js'
|
|
10
10
|
export * from '../all/call_or_fn/index.js'
|
|
11
|
-
export * from '../all/tap/index.js'
|
|
12
11
|
export * from '../all/run/index.js'
|
|
12
|
+
export * from '../all/run_or_val/index.js'
|
|
13
|
+
export * from '../all/tap/index.js'
|
package/run/index.js
CHANGED
|
@@ -8,5 +8,6 @@ export * from '../all/bind_map_call/index.js'
|
|
|
8
8
|
export * from '../all/call/index.js'
|
|
9
9
|
export * from '../all/call_fn_a/index.js'
|
|
10
10
|
export * from '../all/call_or_fn/index.js'
|
|
11
|
-
export * from '../all/tap/index.js'
|
|
12
11
|
export * from '../all/run/index.js'
|
|
12
|
+
export * from '../all/run_or_val/index.js'
|
|
13
|
+
export * from '../all/tap/index.js'
|