cavalion-js 1.0.71 โ 1.0.72
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/.md +27 -7
- package/CHANGELOG.md +8 -0
- package/README.md +1 -1
- package/package.json +1 -1
- package/src/js/_js.js +13 -5
- package/src/util/DocumentHook.js +1 -1
package/.md
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
* [CHANGELOG.md]() - [README.md]() - [package.json]()
|
|
1
|
+
* [CHANGELOG.md]() - [README.md]() - [package.json]()
|
|
2
|
+
* [.workspace](`(devtools/Workspace<${ws.getSpecializer()}>)`) - [.js]()
|
|
2
3
|
|
|
3
4
|
# cavalion-js
|
|
4
5
|
|
|
@@ -45,15 +46,34 @@
|
|
|
45
46
|
- [Scaffold.js](src/js/:)
|
|
46
47
|
- [Type.js](src/js/:)
|
|
47
48
|
|
|
48
|
-
# `
|
|
49
|
+
# `2022/11/02`
|
|
49
50
|
|
|
50
|
-
|
|
51
|
+
What about a shared _polyfill_-like file, loaded at startup in order to fill in the gaps of packages that are not updated/compiled just yet.
|
|
51
52
|
|
|
52
|
-
|
|
53
|
+
if(!js.waitAll) {
|
|
54
|
+
js.waitAll = function(/* ... */) {
|
|
55
|
+
return Promise.all(js.copy_args(arguments).flat().map(p => {
|
|
56
|
+
if(typeof p === "string" && p.endsWith("ms")) { // for syntax/code that says it all
|
|
57
|
+
return new Promise(resolve => setTimeout(resolve, parseInt(p, 10)));
|
|
58
|
+
} else if(typeof p === "number") { // ok, we'll do this too ;-)
|
|
59
|
+
return new Promise(resolve => setTimeout(resolve, p));
|
|
60
|
+
} else if(!(p instanceof Promise)) {
|
|
61
|
+
throw new Error("Can not wait for", p);
|
|
62
|
+
}
|
|
63
|
+
return p;
|
|
64
|
+
}));
|
|
65
|
+
}
|
|
66
|
+
}
|
|
53
67
|
|
|
54
|
-
|
|
68
|
+
# `2022/09/13`
|
|
55
69
|
|
|
56
|
-
|
|
70
|
+
* Working on [README.md]().
|
|
71
|
+
|
|
72
|
+
# `2022/07/25`
|
|
73
|
+
|
|
74
|
+
* Enhancing `js.groupBy` to accept multiple keys for grouping.
|
|
75
|
+
|
|
76
|
+
# `2022/04/29`
|
|
57
77
|
|
|
58
78
|
I want to be able to activate these source files with [an overlay]([!prototypes/Hover]{}) of Markdown. Or... no, I want to overlay the source I guess. ๐๐คจ๐ค
|
|
59
79
|
|
|
@@ -72,7 +92,7 @@ Still, it would be nice to just:
|
|
|
72
92
|
* Press (**โงโ.**) and overlay _the current context_ (whatever that might be anyways, probably a JavaScript module, rapportage-script) with _whatever_, starting with a _context-local_-[.md]()-file, sprouting in to whatever, but _mas-que-nada_ a starting point in order to...
|
|
73
93
|
* ...overlay notes, bookmarks, links, scripts, photos, ...
|
|
74
94
|
|
|
75
|
-
# `
|
|
95
|
+
# `2022/04/24`
|
|
76
96
|
|
|
77
97
|
* `js.args(arr)` - concats and filters `arr` for non-undefined values
|
|
78
98
|
|
package/CHANGELOG.md
CHANGED
package/README.md
CHANGED
package/package.json
CHANGED
package/src/js/_js.js
CHANGED
|
@@ -41,9 +41,6 @@ define(function(require) {
|
|
|
41
41
|
nameOf: nameOf,
|
|
42
42
|
defineClass: defineClass,
|
|
43
43
|
mixIn: mixIn,
|
|
44
|
-
// groupBy: (arr, key) => {
|
|
45
|
-
// return arr.reduce((a, o) => ((a[js.get(key, o)] || (a[js.get(key, o)] = [])).push(o), a), {});
|
|
46
|
-
// },
|
|
47
44
|
groupBy: (arr, keys, mth) => {
|
|
48
45
|
/*- groupBy: receives an array of objects and returns an object
|
|
49
46
|
which keys hold reference to the resulting groups.
|
|
@@ -381,6 +378,17 @@ define(function(require) {
|
|
|
381
378
|
* @returns
|
|
382
379
|
*/
|
|
383
380
|
return window.clearTimeout(id);
|
|
384
|
-
}
|
|
385
|
-
|
|
381
|
+
},
|
|
382
|
+
waitAll: function(/* ... */) {
|
|
383
|
+
return Promise.all(js.copy_args(arguments).flat().map(p => {
|
|
384
|
+
if(typeof p === "string" && p.endsWith("ms")) { // for syntax/code that says it all
|
|
385
|
+
return new Promise(resolve => setTimeout(resolve, parseInt(p, 10)));
|
|
386
|
+
} else if(typeof p === "number") { // ok, we'll do this too ;-)
|
|
387
|
+
return new Promise(resolve => setTimeout(resolve, p));
|
|
388
|
+
} else if(!(p instanceof Promise)) {
|
|
389
|
+
throw new Error("Can not wait for", p);
|
|
390
|
+
}
|
|
391
|
+
return p;
|
|
392
|
+
}));
|
|
393
|
+
}, });
|
|
386
394
|
});
|
package/src/util/DocumentHook.js
CHANGED
|
@@ -18,7 +18,7 @@ define(function(require) {
|
|
|
18
18
|
_events: [
|
|
19
19
|
"ontransitionend",
|
|
20
20
|
"ontouchstart", "ontouchend", "ontouchmove", "ontap", "ondbltap", "ongesture",
|
|
21
|
-
"onclick", "ondblclick",
|
|
21
|
+
"onclick", "ondblclick", "onmouseout", "onmouseover",
|
|
22
22
|
"onmousemove", "onmousedown", "onmouseup", "_onmousewheel", "onmouseenter", "onmouseleave",
|
|
23
23
|
"onkeydown", "onkeyup", "onkeypress",
|
|
24
24
|
"onfocus", "onblur",
|