smsmslib 1.0.7 → 1.0.9

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": "smsmslib",
3
- "version": "1.0.7",
3
+ "version": "1.0.9",
4
4
  "description": "Reusable functions for me.",
5
5
  "scripts": {
6
6
  "test": "echo \"Error: no test specified\" && exit 1"
@@ -0,0 +1,17 @@
1
+ import { useMemo } from 'react';
2
+
3
+
4
+ export function sj_memo_use(f_cal, a_arg, a_dep)
5
+ {
6
+ function f_cal_caller()
7
+ {
8
+ const ret = f_cal(...a_arg);
9
+
10
+ return ret;
11
+ }
12
+
13
+ const ret_memo = useMemo(f_cal_caller, a_dep);
14
+
15
+ return ret_memo;
16
+ }
17
+
package/system/util.js ADDED
@@ -0,0 +1,12 @@
1
+
2
+ export function sj_loop_for_ms(i_ms)
3
+ {
4
+ const i_start_ms = performance.now();
5
+
6
+ do
7
+ {
8
+ const i_now_ms = performance.now();
9
+ }
10
+ while ((i_now_ms - i_start_ms) < i_ms);
11
+ }
12
+
package/tags_JavaScript CHANGED
@@ -5,15 +5,14 @@
5
5
  !_TAG_PROGRAM_URL http://ctags.sourceforge.net /official site/
6
6
  !_TAG_PROGRAM_VERSION 5.9~svn20110310 //
7
7
  Reducer_t /home/sakae/work/react/smsmslib/system/usereducer.js ?^function Reducer_t(value, f_onAction, user)$?;" f
8
- State_t /home/sakae/work/react/smsmslib/system/proto.js ?^export function State_t(val, f_set)$?;" f
9
8
  State_t /home/sakae/work/react/smsmslib/system/usestate.js ?^function State_t(value, f_onAction, user)$?;" f
10
- onAction /home/sakae/work/react/smsmslib/system/proto.js ?^ function onAction(o_eve)$?;" f
9
+ f_cal_caller /home/sakae/work/react/smsmslib/system/usememo.js ?^ function f_cal_caller()$?;" f
11
10
  onAction /home/sakae/work/react/smsmslib/system/usereducer.js ?^ function onAction(o_event)$?;" f
12
11
  onAction /home/sakae/work/react/smsmslib/system/usestate.js ?^ function onAction(o_event)$?;" f
13
- sj_onAction_get /home/sakae/work/react/smsmslib/system/proto.js ?^export function sj_onAction_get(o_main)$?;" f
12
+ sj_loop_for_ms /home/sakae/work/react/smsmslib/system/util.js ?^export function sj_loop_for_ms(i_ms)$?;" f
13
+ sj_memo_use /home/sakae/work/react/smsmslib/system/usememo.js ?^export function sj_memo_use(f_cal, a_arg, a_dep)$?;" f
14
14
  sj_reducer /home/sakae/work/react/smsmslib/system/usereducer.js ?^function sj_reducer(value, o_action)$?;" f
15
15
  sj_reducer_onAction /home/sakae/work/react/smsmslib/system/usereducer.js ?^function sj_reducer_onAction(hf_type, f_dispatch, user)$?;" f
16
16
  sj_reducer_use /home/sakae/work/react/smsmslib/system/usereducer.js ?^export function sj_reducer_use(hf_type, init, f_init, user)$?;" f
17
17
  sj_state_onAction /home/sakae/work/react/smsmslib/system/usestate.js ?^export function sj_state_onAction(value, f_set, hf_type, user)$?;" f
18
- sj_state_use /home/sakae/work/react/smsmslib/system/usestate.js ?^export function sj_state_use(init, hf_type, user)$?;" f
19
- sj_use_state /home/sakae/work/react/smsmslib/system/proto.js ?^export function sj_use_state(ini)$?;" f
18
+ sj_state_use /home/sakae/work/react/smsmslib/system/usestate.js ?^export function sj_state_use(f_init, hf_type, user)$?;" f