@oliversalzburg/js-utils 0.0.18 → 0.0.19-dev.0
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/array.d.ts +39 -0
- package/{lib/array.js → array.js} +12 -13
- package/array.js.map +1 -0
- package/async.d.ts +28 -0
- package/{lib/async.js → async.js} +16 -10
- package/async.js.map +1 -0
- package/async.test.js +28 -0
- package/async.test.js.map +1 -0
- package/core.d.ts +36 -0
- package/core.js +3 -0
- package/core.js.map +1 -0
- package/{lib/dom → dom}/core.d.ts +8 -8
- package/{lib/dom → dom}/core.js +8 -8
- package/{lib/error-serializer.d.ts → error-serializer.d.ts} +5 -5
- package/{lib/error-serializer.js → error-serializer.js} +5 -5
- package/{lib/errors → errors}/AbstractError.d.ts +5 -5
- package/{lib/errors → errors}/AbstractError.js +5 -5
- package/{lib/errors → errors}/InternalError.d.ts +3 -3
- package/{lib/errors → errors}/InternalError.js +3 -3
- package/{lib/errors → errors}/InvalidArgumentError.d.ts +2 -2
- package/{lib/errors → errors}/InvalidArgumentError.js +2 -2
- package/{lib/errors → errors}/InvalidOperationError.d.ts +2 -2
- package/{lib/errors → errors}/InvalidOperationError.js +2 -2
- package/{lib/errors → errors}/NotImplementedError.d.ts +2 -2
- package/{lib/errors → errors}/NotImplementedError.js +2 -2
- package/{lib/errors → errors}/PermissionViolationError.d.ts +2 -2
- package/{lib/errors → errors}/PermissionViolationError.js +2 -2
- package/{lib/errors → errors}/ResourceConflictError.d.ts +2 -2
- package/{lib/errors → errors}/ResourceConflictError.js +2 -2
- package/{lib/errors → errors}/UnknownError.d.ts +2 -2
- package/{lib/errors → errors}/UnknownError.js +2 -2
- package/{lib/graphics → graphics}/canvas-sandbox.d.ts +13 -13
- package/{lib/graphics → graphics}/canvas-sandbox.js +9 -9
- package/{lib/graphics → graphics}/canvas.d.ts +30 -30
- package/{lib/graphics → graphics}/canvas.js +30 -30
- package/{lib/graphics → graphics}/core.d.ts +23 -23
- package/{lib/graphics → graphics}/core.js +23 -24
- package/{lib/graphics → graphics}/core.js.map +1 -1
- package/{lib/graphics → graphics}/render-loop.d.ts +3 -3
- package/{lib/graphics → graphics}/render-loop.js +3 -3
- package/{lib/math → math}/core.d.ts +19 -10
- package/{lib/math → math}/core.js +21 -10
- package/{lib/math → math}/core.js.map +1 -1
- package/{lib/math → math}/euler.d.ts +4 -4
- package/{lib/math → math}/euler.js +4 -4
- package/{lib/math → math}/matrix3.d.ts +34 -34
- package/{lib/math → math}/matrix3.js +34 -34
- package/{lib/math → math}/quaternion.d.ts +25 -25
- package/{lib/math → math}/quaternion.js +25 -25
- package/{lib/math → math}/transformation.d.ts +3 -3
- package/{lib/math → math}/transformation.js +3 -3
- package/{lib/math → math}/vector2.d.ts +40 -40
- package/{lib/math → math}/vector2.js +40 -40
- package/{lib/math → math}/vector3.d.ts +66 -66
- package/{lib/math → math}/vector3.js +66 -66
- package/{lib/math → math}/vector4.d.ts +38 -38
- package/{lib/math → math}/vector4.js +38 -38
- package/{lib/nil.d.ts → nil.d.ts} +11 -9
- package/{lib/nil.js → nil.js} +10 -9
- package/{lib/nil.js.map → nil.js.map} +1 -1
- package/package.json +16 -18
- package/{lib/random.d.ts → random.d.ts} +11 -17
- package/{lib/random.js → random.js} +11 -17
- package/random.js.map +1 -0
- package/{lib/sleep.d.ts → sleep.d.ts} +1 -1
- package/{lib/sleep.js → sleep.js} +1 -1
- package/{lib/string-formatter.d.ts → string-formatter.d.ts} +8 -4
- package/{lib/string-formatter.js → string-formatter.js} +8 -4
- package/string-formatter.js.map +1 -0
- package/string-formatter.test.d.ts +1 -0
- package/tsconfig.tsbuildinfo +1 -0
- package/LICENSES.md +0 -17
- package/_site/assets/highlight.css +0 -141
- package/_site/assets/main.js +0 -59
- package/_site/assets/navigation.js +0 -1
- package/_site/assets/search.js +0 -1
- package/_site/assets/style.css +0 -1383
- package/_site/classes/AbstractError.html +0 -67
- package/_site/classes/Canvas.html +0 -106
- package/_site/classes/CanvasSandbox.html +0 -91
- package/_site/classes/Euler.html +0 -217
- package/_site/classes/InternalError.html +0 -71
- package/_site/classes/InvalidArgumentError.html +0 -67
- package/_site/classes/InvalidOperationError.html +0 -67
- package/_site/classes/Matrix3.html +0 -167
- package/_site/classes/NotImplementedError.html +0 -66
- package/_site/classes/PermissionViolationError.html +0 -67
- package/_site/classes/Quaternion.html +0 -211
- package/_site/classes/Random.html +0 -90
- package/_site/classes/RenderLoop.html +0 -85
- package/_site/classes/ResourceConflictError.html +0 -66
- package/_site/classes/Transformation.html +0 -52
- package/_site/classes/UnexpectedNilError.html +0 -54
- package/_site/classes/UnknownError.html +0 -70
- package/_site/classes/Vector2.html +0 -159
- package/_site/classes/Vector3.html +0 -214
- package/_site/classes/Vector4.html +0 -156
- package/_site/functions/addVector2.html +0 -44
- package/_site/functions/addVector3.html +0 -44
- package/_site/functions/blend.html +0 -47
- package/_site/functions/blendAdditive.html +0 -47
- package/_site/functions/blendSubtractive.html +0 -47
- package/_site/functions/clamp.html +0 -45
- package/_site/functions/coalesceOnRejection.html +0 -51
- package/_site/functions/cosDeg.html +0 -43
- package/_site/functions/crossVector3.html +0 -44
- package/_site/functions/deg2rad.html +0 -43
- package/_site/functions/difference.html +0 -46
- package/_site/functions/distance.html +0 -46
- package/_site/functions/dotVector3.html +0 -44
- package/_site/functions/errorToJSON.html +0 -43
- package/_site/functions/errorToRecord.html +0 -43
- package/_site/functions/errorToSimpleSerializable.html +0 -43
- package/_site/functions/filterType.html +0 -46
- package/_site/functions/formatString.html +0 -46
- package/_site/functions/formatStringTemplate.html +0 -46
- package/_site/functions/fromRGB.html +0 -46
- package/_site/functions/fromRGBA.html +0 -46
- package/_site/functions/getA.html +0 -43
- package/_site/functions/getB.html +0 -43
- package/_site/functions/getDocumentElementTypeById.html +0 -46
- package/_site/functions/getDocumentElementTypeByIdStrict.html +0 -48
- package/_site/functions/getG.html +0 -43
- package/_site/functions/getR.html +0 -43
- package/_site/functions/intersect.html +0 -47
- package/_site/functions/is.html +0 -46
- package/_site/functions/isError.html +0 -43
- package/_site/functions/isInteger.html +0 -43
- package/_site/functions/isNil.html +0 -44
- package/_site/functions/isqrt.html +0 -43
- package/_site/functions/multiplyVector2.html +0 -44
- package/_site/functions/multiplyVector3.html +0 -44
- package/_site/functions/mustExist.html +0 -45
- package/_site/functions/nextPalette.html +0 -42
- package/_site/functions/prepareAsyncContext.html +0 -46
- package/_site/functions/putPixel32.html +0 -53
- package/_site/functions/putPixel32Add.html +0 -53
- package/_site/functions/putPixel32Sub.html +0 -53
- package/_site/functions/putSubPixel32.html +0 -47
- package/_site/functions/rad2deg.html +0 -43
- package/_site/functions/randomRange.html +0 -45
- package/_site/functions/safeRGBComponent.html +0 -43
- package/_site/functions/seedFromString.html +0 -44
- package/_site/functions/shuffleArray.html +0 -44
- package/_site/functions/sinDeg.html +0 -43
- package/_site/functions/sleep.html +0 -43
- package/_site/functions/somecolor.html +0 -43
- package/_site/functions/subtractVector2.html +0 -44
- package/_site/functions/subtractVector3.html +0 -44
- package/_site/functions/toGrayScale.html +0 -43
- package/_site/functions/unknownToError.html +0 -45
- package/_site/index.html +0 -44
- package/_site/interfaces/CanvasOptions.html +0 -44
- package/_site/interfaces/CanvasSandboxApplication.html +0 -60
- package/_site/interfaces/CanvasSandboxExpectedOptions.html +0 -48
- package/_site/interfaces/CanvasSandboxOptions.html +0 -45
- package/_site/interfaces/RenderLoopOptions.html +0 -46
- package/_site/modules.html +0 -134
- package/_site/types/AnyAsyncFunction.html +0 -41
- package/_site/types/AnyConstructor.html +0 -41
- package/_site/types/AnyFunction.html +0 -41
- package/_site/types/ConstructorOf.html +0 -41
- package/_site/types/FunctionReturning.html +0 -41
- package/_site/types/Maybe.html +0 -41
- package/_site/types/Mixin.html +0 -42
- package/_site/types/Nil.html +0 -42
- package/_site/types/RenderLoopCallback.html +0 -41
- package/_site/types/SerializedError.html +0 -41
- package/_site/variables/CANVAS_SANDBOX_DEFAULT_CSS.html +0 -41
- package/_site/variables/MS_PER_FRAME_60FPS.html +0 -42
- package/_site/variables/PALETTES.html +0 -41
- package/_site/variables/TWO_PI.html +0 -41
- package/_site/variables/random-1.html +0 -41
- package/coverage/base.css +0 -224
- package/coverage/block-navigation.js +0 -87
- package/coverage/bundle.js +0 -30
- package/coverage/favicon.png +0 -0
- package/coverage/index.html +0 -16
- package/coverage/prettify.css +0 -1
- package/coverage/prettify.js +0 -2
- package/coverage/sort-arrow-sprite.png +0 -0
- package/coverage/sorter.js +0 -196
- package/coverage/spa.css +0 -298
- package/coverage/string-formatter.ts.html +0 -187
- package/coverage/tmp/coverage-4186-1699218521999-0.json +0 -1
- package/coverage/tmp/coverage-4196-1699218521967-0.json +0 -1
- package/docs/assets/favicon.ico +0 -0
- package/lib/array.d.ts +0 -40
- package/lib/array.js.map +0 -1
- package/lib/async.d.ts +0 -27
- package/lib/async.js.map +0 -1
- package/lib/core.d.ts +0 -33
- package/lib/core.js +0 -12
- package/lib/core.js.map +0 -1
- package/lib/random.js.map +0 -1
- package/lib/string-formatter.js.map +0 -1
- package/mkdocs.yml +0 -52
- /package/{lib/error-serializer.test.d.ts → async.test.d.ts} +0 -0
- /package/{lib/dom → dom}/core.js.map +0 -0
- /package/{lib/dom → dom}/index.d.ts +0 -0
- /package/{lib/dom → dom}/index.js +0 -0
- /package/{lib/dom → dom}/index.js.map +0 -0
- /package/{lib/error-serializer.js.map → error-serializer.js.map} +0 -0
- /package/{lib/string-formatter.test.d.ts → error-serializer.test.d.ts} +0 -0
- /package/{lib/error-serializer.test.js → error-serializer.test.js} +0 -0
- /package/{lib/error-serializer.test.js.map → error-serializer.test.js.map} +0 -0
- /package/{lib/errors → errors}/AbstractError.js.map +0 -0
- /package/{lib/errors → errors}/InternalError.js.map +0 -0
- /package/{lib/errors → errors}/InvalidArgumentError.js.map +0 -0
- /package/{lib/errors → errors}/InvalidOperationError.js.map +0 -0
- /package/{lib/errors → errors}/NotImplementedError.js.map +0 -0
- /package/{lib/errors → errors}/PermissionViolationError.js.map +0 -0
- /package/{lib/errors → errors}/ResourceConflictError.js.map +0 -0
- /package/{lib/errors → errors}/UnknownError.js.map +0 -0
- /package/{lib/errors → errors}/index.d.ts +0 -0
- /package/{lib/errors → errors}/index.js +0 -0
- /package/{lib/errors → errors}/index.js.map +0 -0
- /package/{lib/graphics → graphics}/canvas-sandbox.js.map +0 -0
- /package/{lib/graphics → graphics}/canvas.js.map +0 -0
- /package/{lib/graphics → graphics}/index.d.ts +0 -0
- /package/{lib/graphics → graphics}/index.js +0 -0
- /package/{lib/graphics → graphics}/index.js.map +0 -0
- /package/{lib/graphics → graphics}/render-loop.js.map +0 -0
- /package/{lib/index.d.ts → index.d.ts} +0 -0
- /package/{lib/index.js → index.js} +0 -0
- /package/{lib/index.js.map → index.js.map} +0 -0
- /package/{lib/math → math}/euler.js.map +0 -0
- /package/{lib/math → math}/index.d.ts +0 -0
- /package/{lib/math → math}/index.js +0 -0
- /package/{lib/math → math}/index.js.map +0 -0
- /package/{lib/math → math}/matrix3.js.map +0 -0
- /package/{lib/math → math}/quaternion.js.map +0 -0
- /package/{lib/math → math}/transformation.js.map +0 -0
- /package/{lib/math → math}/vector2.js.map +0 -0
- /package/{lib/math → math}/vector3.js.map +0 -0
- /package/{lib/math → math}/vector4.js.map +0 -0
- /package/{lib/sleep.js.map → sleep.js.map} +0 -0
- /package/{lib/string-formatter.test.js → string-formatter.test.js} +0 -0
- /package/{lib/string-formatter.test.js.map → string-formatter.test.js.map} +0 -0
package/coverage/sorter.js
DELETED
|
@@ -1,196 +0,0 @@
|
|
|
1
|
-
/* eslint-disable */
|
|
2
|
-
var addSorting = (function() {
|
|
3
|
-
'use strict';
|
|
4
|
-
var cols,
|
|
5
|
-
currentSort = {
|
|
6
|
-
index: 0,
|
|
7
|
-
desc: false
|
|
8
|
-
};
|
|
9
|
-
|
|
10
|
-
// returns the summary table element
|
|
11
|
-
function getTable() {
|
|
12
|
-
return document.querySelector('.coverage-summary');
|
|
13
|
-
}
|
|
14
|
-
// returns the thead element of the summary table
|
|
15
|
-
function getTableHeader() {
|
|
16
|
-
return getTable().querySelector('thead tr');
|
|
17
|
-
}
|
|
18
|
-
// returns the tbody element of the summary table
|
|
19
|
-
function getTableBody() {
|
|
20
|
-
return getTable().querySelector('tbody');
|
|
21
|
-
}
|
|
22
|
-
// returns the th element for nth column
|
|
23
|
-
function getNthColumn(n) {
|
|
24
|
-
return getTableHeader().querySelectorAll('th')[n];
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
function onFilterInput() {
|
|
28
|
-
const searchValue = document.getElementById('fileSearch').value;
|
|
29
|
-
const rows = document.getElementsByTagName('tbody')[0].children;
|
|
30
|
-
for (let i = 0; i < rows.length; i++) {
|
|
31
|
-
const row = rows[i];
|
|
32
|
-
if (
|
|
33
|
-
row.textContent
|
|
34
|
-
.toLowerCase()
|
|
35
|
-
.includes(searchValue.toLowerCase())
|
|
36
|
-
) {
|
|
37
|
-
row.style.display = '';
|
|
38
|
-
} else {
|
|
39
|
-
row.style.display = 'none';
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
// loads the search box
|
|
45
|
-
function addSearchBox() {
|
|
46
|
-
var template = document.getElementById('filterTemplate');
|
|
47
|
-
var templateClone = template.content.cloneNode(true);
|
|
48
|
-
templateClone.getElementById('fileSearch').oninput = onFilterInput;
|
|
49
|
-
template.parentElement.appendChild(templateClone);
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
// loads all columns
|
|
53
|
-
function loadColumns() {
|
|
54
|
-
var colNodes = getTableHeader().querySelectorAll('th'),
|
|
55
|
-
colNode,
|
|
56
|
-
cols = [],
|
|
57
|
-
col,
|
|
58
|
-
i;
|
|
59
|
-
|
|
60
|
-
for (i = 0; i < colNodes.length; i += 1) {
|
|
61
|
-
colNode = colNodes[i];
|
|
62
|
-
col = {
|
|
63
|
-
key: colNode.getAttribute('data-col'),
|
|
64
|
-
sortable: !colNode.getAttribute('data-nosort'),
|
|
65
|
-
type: colNode.getAttribute('data-type') || 'string'
|
|
66
|
-
};
|
|
67
|
-
cols.push(col);
|
|
68
|
-
if (col.sortable) {
|
|
69
|
-
col.defaultDescSort = col.type === 'number';
|
|
70
|
-
colNode.innerHTML =
|
|
71
|
-
colNode.innerHTML + '<span class="sorter"></span>';
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
return cols;
|
|
75
|
-
}
|
|
76
|
-
// attaches a data attribute to every tr element with an object
|
|
77
|
-
// of data values keyed by column name
|
|
78
|
-
function loadRowData(tableRow) {
|
|
79
|
-
var tableCols = tableRow.querySelectorAll('td'),
|
|
80
|
-
colNode,
|
|
81
|
-
col,
|
|
82
|
-
data = {},
|
|
83
|
-
i,
|
|
84
|
-
val;
|
|
85
|
-
for (i = 0; i < tableCols.length; i += 1) {
|
|
86
|
-
colNode = tableCols[i];
|
|
87
|
-
col = cols[i];
|
|
88
|
-
val = colNode.getAttribute('data-value');
|
|
89
|
-
if (col.type === 'number') {
|
|
90
|
-
val = Number(val);
|
|
91
|
-
}
|
|
92
|
-
data[col.key] = val;
|
|
93
|
-
}
|
|
94
|
-
return data;
|
|
95
|
-
}
|
|
96
|
-
// loads all row data
|
|
97
|
-
function loadData() {
|
|
98
|
-
var rows = getTableBody().querySelectorAll('tr'),
|
|
99
|
-
i;
|
|
100
|
-
|
|
101
|
-
for (i = 0; i < rows.length; i += 1) {
|
|
102
|
-
rows[i].data = loadRowData(rows[i]);
|
|
103
|
-
}
|
|
104
|
-
}
|
|
105
|
-
// sorts the table using the data for the ith column
|
|
106
|
-
function sortByIndex(index, desc) {
|
|
107
|
-
var key = cols[index].key,
|
|
108
|
-
sorter = function(a, b) {
|
|
109
|
-
a = a.data[key];
|
|
110
|
-
b = b.data[key];
|
|
111
|
-
return a < b ? -1 : a > b ? 1 : 0;
|
|
112
|
-
},
|
|
113
|
-
finalSorter = sorter,
|
|
114
|
-
tableBody = document.querySelector('.coverage-summary tbody'),
|
|
115
|
-
rowNodes = tableBody.querySelectorAll('tr'),
|
|
116
|
-
rows = [],
|
|
117
|
-
i;
|
|
118
|
-
|
|
119
|
-
if (desc) {
|
|
120
|
-
finalSorter = function(a, b) {
|
|
121
|
-
return -1 * sorter(a, b);
|
|
122
|
-
};
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
for (i = 0; i < rowNodes.length; i += 1) {
|
|
126
|
-
rows.push(rowNodes[i]);
|
|
127
|
-
tableBody.removeChild(rowNodes[i]);
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
rows.sort(finalSorter);
|
|
131
|
-
|
|
132
|
-
for (i = 0; i < rows.length; i += 1) {
|
|
133
|
-
tableBody.appendChild(rows[i]);
|
|
134
|
-
}
|
|
135
|
-
}
|
|
136
|
-
// removes sort indicators for current column being sorted
|
|
137
|
-
function removeSortIndicators() {
|
|
138
|
-
var col = getNthColumn(currentSort.index),
|
|
139
|
-
cls = col.className;
|
|
140
|
-
|
|
141
|
-
cls = cls.replace(/ sorted$/, '').replace(/ sorted-desc$/, '');
|
|
142
|
-
col.className = cls;
|
|
143
|
-
}
|
|
144
|
-
// adds sort indicators for current column being sorted
|
|
145
|
-
function addSortIndicators() {
|
|
146
|
-
getNthColumn(currentSort.index).className += currentSort.desc
|
|
147
|
-
? ' sorted-desc'
|
|
148
|
-
: ' sorted';
|
|
149
|
-
}
|
|
150
|
-
// adds event listeners for all sorter widgets
|
|
151
|
-
function enableUI() {
|
|
152
|
-
var i,
|
|
153
|
-
el,
|
|
154
|
-
ithSorter = function ithSorter(i) {
|
|
155
|
-
var col = cols[i];
|
|
156
|
-
|
|
157
|
-
return function() {
|
|
158
|
-
var desc = col.defaultDescSort;
|
|
159
|
-
|
|
160
|
-
if (currentSort.index === i) {
|
|
161
|
-
desc = !currentSort.desc;
|
|
162
|
-
}
|
|
163
|
-
sortByIndex(i, desc);
|
|
164
|
-
removeSortIndicators();
|
|
165
|
-
currentSort.index = i;
|
|
166
|
-
currentSort.desc = desc;
|
|
167
|
-
addSortIndicators();
|
|
168
|
-
};
|
|
169
|
-
};
|
|
170
|
-
for (i = 0; i < cols.length; i += 1) {
|
|
171
|
-
if (cols[i].sortable) {
|
|
172
|
-
// add the click event handler on the th so users
|
|
173
|
-
// dont have to click on those tiny arrows
|
|
174
|
-
el = getNthColumn(i).querySelector('.sorter').parentElement;
|
|
175
|
-
if (el.addEventListener) {
|
|
176
|
-
el.addEventListener('click', ithSorter(i));
|
|
177
|
-
} else {
|
|
178
|
-
el.attachEvent('onclick', ithSorter(i));
|
|
179
|
-
}
|
|
180
|
-
}
|
|
181
|
-
}
|
|
182
|
-
}
|
|
183
|
-
// adds sorting functionality to the UI
|
|
184
|
-
return function() {
|
|
185
|
-
if (!getTable()) {
|
|
186
|
-
return;
|
|
187
|
-
}
|
|
188
|
-
cols = loadColumns();
|
|
189
|
-
loadData();
|
|
190
|
-
addSearchBox();
|
|
191
|
-
addSortIndicators();
|
|
192
|
-
enableUI();
|
|
193
|
-
};
|
|
194
|
-
})();
|
|
195
|
-
|
|
196
|
-
window.addEventListener('load', addSorting);
|
package/coverage/spa.css
DELETED
|
@@ -1,298 +0,0 @@
|
|
|
1
|
-
/* Base */
|
|
2
|
-
|
|
3
|
-
body,
|
|
4
|
-
html {
|
|
5
|
-
margin: 0;
|
|
6
|
-
padding: 0;
|
|
7
|
-
height: 100%;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
body {
|
|
11
|
-
color: #333;
|
|
12
|
-
background-color: #fcfcfc;
|
|
13
|
-
font: 14px/14px -apple-system, system-ui, BlinkMacSystemFont, 'Segoe UI',
|
|
14
|
-
Roboto, 'Helvetica Neue', Arial, sans-serif;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
button {
|
|
18
|
-
margin: 0;
|
|
19
|
-
border: none;
|
|
20
|
-
font: inherit;
|
|
21
|
-
color: inherit;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
button:focus {
|
|
25
|
-
outline: none;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
*,
|
|
29
|
-
*:after,
|
|
30
|
-
*:before {
|
|
31
|
-
-webkit-box-sizing: border-box;
|
|
32
|
-
-moz-box-sizing: border-box;
|
|
33
|
-
box-sizing: border-box;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
/* Typography */
|
|
37
|
-
|
|
38
|
-
h1 {
|
|
39
|
-
font-size: 20px;
|
|
40
|
-
line-height: 20px;
|
|
41
|
-
margin: 0;
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
a {
|
|
45
|
-
color: #0074d9;
|
|
46
|
-
text-decoration: none;
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
a:hover {
|
|
50
|
-
text-decoration: underline;
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
.small {
|
|
54
|
-
font-size: 12px;
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
.strong {
|
|
58
|
-
font-weight: bold;
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
.center {
|
|
62
|
-
text-align: center;
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
.quiet {
|
|
66
|
-
opacity: 0.7;
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
/* Colors */
|
|
70
|
-
|
|
71
|
-
.low {
|
|
72
|
-
background: #fce1e5;
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
.low--dark {
|
|
76
|
-
background: #c21f39;
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
.medium {
|
|
80
|
-
background: #fff4c2;
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
.medium--dark {
|
|
84
|
-
background: #f9cd0b;
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
.high {
|
|
88
|
-
background: rgb(230, 245, 208);
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
.high--dark {
|
|
92
|
-
background: rgb(77, 146, 33);
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
/* App */
|
|
96
|
-
|
|
97
|
-
.app {
|
|
98
|
-
height: 100%;
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
/* Layout */
|
|
102
|
-
|
|
103
|
-
.layout {
|
|
104
|
-
display: flex;
|
|
105
|
-
flex-direction: column;
|
|
106
|
-
min-height: 100%;
|
|
107
|
-
padding: 20px;
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
.layout__section {
|
|
111
|
-
flex-grow: 0;
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
.layout__section--fill {
|
|
115
|
-
flex-grow: 1;
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
.layout__section + .layout__section {
|
|
119
|
-
margin-top: 20px;
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
@media only screen and (max-width: 640px) {
|
|
123
|
-
.col3 {
|
|
124
|
-
width: 100%;
|
|
125
|
-
max-width: 100%;
|
|
126
|
-
}
|
|
127
|
-
.hide-mobile {
|
|
128
|
-
display: none !important;
|
|
129
|
-
}
|
|
130
|
-
}
|
|
131
|
-
|
|
132
|
-
/* Toolbar */
|
|
133
|
-
|
|
134
|
-
.toolbar {
|
|
135
|
-
display: flex;
|
|
136
|
-
flex-wrap: wrap;
|
|
137
|
-
}
|
|
138
|
-
|
|
139
|
-
.toolbar__item {
|
|
140
|
-
margin-right: 40px;
|
|
141
|
-
margin-bottom: 10px;
|
|
142
|
-
}
|
|
143
|
-
|
|
144
|
-
/* Toggle */
|
|
145
|
-
|
|
146
|
-
.toggle {
|
|
147
|
-
display: inline-flex;
|
|
148
|
-
align-items: center;
|
|
149
|
-
}
|
|
150
|
-
|
|
151
|
-
.toggle__label {
|
|
152
|
-
margin-right: 0.5em;
|
|
153
|
-
}
|
|
154
|
-
|
|
155
|
-
.toggle__options {
|
|
156
|
-
display: inline-block;
|
|
157
|
-
border: 1px solid #0074d9;
|
|
158
|
-
border-radius: 4px;
|
|
159
|
-
color: #0074d9;
|
|
160
|
-
overflow: hidden;
|
|
161
|
-
white-space: nowrap;
|
|
162
|
-
}
|
|
163
|
-
|
|
164
|
-
.toggle__option {
|
|
165
|
-
padding: 4px 8px;
|
|
166
|
-
background: #fcfcfc;
|
|
167
|
-
}
|
|
168
|
-
|
|
169
|
-
.toggle__option + .toggle__option {
|
|
170
|
-
border-left: 1px solid #0074d9;
|
|
171
|
-
}
|
|
172
|
-
|
|
173
|
-
.toggle__option.is-toggled {
|
|
174
|
-
color: #fff;
|
|
175
|
-
background: #0074d9;
|
|
176
|
-
border-left-color: #fcfcfc;
|
|
177
|
-
}
|
|
178
|
-
|
|
179
|
-
/* Expand */
|
|
180
|
-
|
|
181
|
-
.expandbutton {
|
|
182
|
-
display: inline-block;
|
|
183
|
-
width: 1em;
|
|
184
|
-
margin-right: 0.25em;
|
|
185
|
-
padding: 0;
|
|
186
|
-
background-color: transparent;
|
|
187
|
-
font-weight: bold;
|
|
188
|
-
}
|
|
189
|
-
|
|
190
|
-
/* Fraction */
|
|
191
|
-
|
|
192
|
-
.fraction {
|
|
193
|
-
font-size: 12px;
|
|
194
|
-
color: #666;
|
|
195
|
-
padding: 2px 4px;
|
|
196
|
-
border-radius: 4px;
|
|
197
|
-
}
|
|
198
|
-
|
|
199
|
-
/* Coverage */
|
|
200
|
-
|
|
201
|
-
.coverage-summary {
|
|
202
|
-
border-collapse: collapse;
|
|
203
|
-
}
|
|
204
|
-
|
|
205
|
-
.coverage-summary tbody tr {
|
|
206
|
-
border-bottom: 1px solid #fff;
|
|
207
|
-
}
|
|
208
|
-
|
|
209
|
-
.coverage-summary td,
|
|
210
|
-
.coverage-summary th {
|
|
211
|
-
padding: 5px;
|
|
212
|
-
}
|
|
213
|
-
|
|
214
|
-
.coverage-summary th {
|
|
215
|
-
text-align: center;
|
|
216
|
-
font-weight: normal;
|
|
217
|
-
white-space: nowrap;
|
|
218
|
-
}
|
|
219
|
-
|
|
220
|
-
.coverage-summary th.abs,
|
|
221
|
-
.coverage-summary td.pct,
|
|
222
|
-
.coverage-summary td.abs {
|
|
223
|
-
text-align: right;
|
|
224
|
-
}
|
|
225
|
-
|
|
226
|
-
.coverage-summary th.file {
|
|
227
|
-
min-width: 300px;
|
|
228
|
-
text-align: left;
|
|
229
|
-
}
|
|
230
|
-
|
|
231
|
-
.coverage-summary td.file {
|
|
232
|
-
white-space: nowrap;
|
|
233
|
-
}
|
|
234
|
-
|
|
235
|
-
.coverage-summary td.pct {
|
|
236
|
-
font-weight: 400;
|
|
237
|
-
}
|
|
238
|
-
|
|
239
|
-
.coverage-summary td.abs {
|
|
240
|
-
color: #666;
|
|
241
|
-
font-size: 12px;
|
|
242
|
-
}
|
|
243
|
-
|
|
244
|
-
.coverage-summary td.empty {
|
|
245
|
-
opacity: 0.5;
|
|
246
|
-
}
|
|
247
|
-
|
|
248
|
-
.coverage-summary .headercell {
|
|
249
|
-
border-top: 1px solid #eee;
|
|
250
|
-
text-align: right;
|
|
251
|
-
font-size: 12px;
|
|
252
|
-
color: #666;
|
|
253
|
-
}
|
|
254
|
-
|
|
255
|
-
.coverage-summary .headercell:nth-child(5n - 2),
|
|
256
|
-
.coverage-summary td:nth-child(5n - 2) {
|
|
257
|
-
border-left: 2px solid #fcfcfc;
|
|
258
|
-
padding-left: 2em;
|
|
259
|
-
}
|
|
260
|
-
|
|
261
|
-
.filetab {
|
|
262
|
-
display: inline-block;
|
|
263
|
-
width: 1em;
|
|
264
|
-
}
|
|
265
|
-
|
|
266
|
-
/* Sorter */
|
|
267
|
-
|
|
268
|
-
.sorter {
|
|
269
|
-
display: inline-block;
|
|
270
|
-
width: 7px;
|
|
271
|
-
height: 10px;
|
|
272
|
-
margin-left: 0.5em;
|
|
273
|
-
background: url(sort-arrow-sprite.png) no-repeat scroll 0 0 transparent;
|
|
274
|
-
}
|
|
275
|
-
|
|
276
|
-
.sorted .sorter {
|
|
277
|
-
background-position: 0 -20px;
|
|
278
|
-
}
|
|
279
|
-
|
|
280
|
-
.sorted-desc .sorter {
|
|
281
|
-
background-position: 0 -10px;
|
|
282
|
-
}
|
|
283
|
-
|
|
284
|
-
.sortable {
|
|
285
|
-
cursor: pointer;
|
|
286
|
-
}
|
|
287
|
-
|
|
288
|
-
/* Bar */
|
|
289
|
-
|
|
290
|
-
.bar {
|
|
291
|
-
width: 50px;
|
|
292
|
-
height: 5px;
|
|
293
|
-
background: #fff;
|
|
294
|
-
}
|
|
295
|
-
|
|
296
|
-
.bar__data {
|
|
297
|
-
height: 100%;
|
|
298
|
-
}
|
|
@@ -1,187 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
<!doctype html>
|
|
3
|
-
<html lang="en">
|
|
4
|
-
|
|
5
|
-
<head>
|
|
6
|
-
<title>Code coverage report for string-formatter.ts</title>
|
|
7
|
-
<meta charset="utf-8" />
|
|
8
|
-
<link rel="stylesheet" href="prettify.css" />
|
|
9
|
-
<link rel="stylesheet" href="base.css" />
|
|
10
|
-
<link rel="shortcut icon" type="image/x-icon" href="favicon.png" />
|
|
11
|
-
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
12
|
-
<style type='text/css'>
|
|
13
|
-
.coverage-summary .sorter {
|
|
14
|
-
background-image: url(sort-arrow-sprite.png);
|
|
15
|
-
}
|
|
16
|
-
</style>
|
|
17
|
-
</head>
|
|
18
|
-
|
|
19
|
-
<body>
|
|
20
|
-
<div class='wrapper'>
|
|
21
|
-
<div class='pad1'>
|
|
22
|
-
<h1><a href="javascript:history.back()">Back</a></h1>
|
|
23
|
-
<div class='clearfix'>
|
|
24
|
-
|
|
25
|
-
<div class='fl pad1y space-right2'>
|
|
26
|
-
<span class="strong">100% </span>
|
|
27
|
-
<span class="quiet">Statements</span>
|
|
28
|
-
<span class='fraction'>34/34</span>
|
|
29
|
-
</div>
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
<div class='fl pad1y space-right2'>
|
|
33
|
-
<span class="strong">100% </span>
|
|
34
|
-
<span class="quiet">Branches</span>
|
|
35
|
-
<span class='fraction'>7/7</span>
|
|
36
|
-
</div>
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
<div class='fl pad1y space-right2'>
|
|
40
|
-
<span class="strong">100% </span>
|
|
41
|
-
<span class="quiet">Functions</span>
|
|
42
|
-
<span class='fraction'>2/2</span>
|
|
43
|
-
</div>
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
<div class='fl pad1y space-right2'>
|
|
47
|
-
<span class="strong">100% </span>
|
|
48
|
-
<span class="quiet">Lines</span>
|
|
49
|
-
<span class='fraction'>34/34</span>
|
|
50
|
-
</div>
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
</div>
|
|
54
|
-
<p class="quiet">
|
|
55
|
-
Press <em>n</em> or <em>j</em> to go to the next uncovered block, <em>b</em>, <em>p</em> or <em>k</em> for the previous block.
|
|
56
|
-
</p>
|
|
57
|
-
<template id="filterTemplate">
|
|
58
|
-
<div class="quiet">
|
|
59
|
-
Filter:
|
|
60
|
-
<input oninput="onInput()" type="search" id="fileSearch">
|
|
61
|
-
</div>
|
|
62
|
-
</template>
|
|
63
|
-
</div>
|
|
64
|
-
<div class='status-line high'></div>
|
|
65
|
-
<pre><table class="coverage">
|
|
66
|
-
<tr><td class="line-count quiet"><a name='L1'></a><a href='#L1'>1</a>
|
|
67
|
-
<a name='L2'></a><a href='#L2'>2</a>
|
|
68
|
-
<a name='L3'></a><a href='#L3'>3</a>
|
|
69
|
-
<a name='L4'></a><a href='#L4'>4</a>
|
|
70
|
-
<a name='L5'></a><a href='#L5'>5</a>
|
|
71
|
-
<a name='L6'></a><a href='#L6'>6</a>
|
|
72
|
-
<a name='L7'></a><a href='#L7'>7</a>
|
|
73
|
-
<a name='L8'></a><a href='#L8'>8</a>
|
|
74
|
-
<a name='L9'></a><a href='#L9'>9</a>
|
|
75
|
-
<a name='L10'></a><a href='#L10'>10</a>
|
|
76
|
-
<a name='L11'></a><a href='#L11'>11</a>
|
|
77
|
-
<a name='L12'></a><a href='#L12'>12</a>
|
|
78
|
-
<a name='L13'></a><a href='#L13'>13</a>
|
|
79
|
-
<a name='L14'></a><a href='#L14'>14</a>
|
|
80
|
-
<a name='L15'></a><a href='#L15'>15</a>
|
|
81
|
-
<a name='L16'></a><a href='#L16'>16</a>
|
|
82
|
-
<a name='L17'></a><a href='#L17'>17</a>
|
|
83
|
-
<a name='L18'></a><a href='#L18'>18</a>
|
|
84
|
-
<a name='L19'></a><a href='#L19'>19</a>
|
|
85
|
-
<a name='L20'></a><a href='#L20'>20</a>
|
|
86
|
-
<a name='L21'></a><a href='#L21'>21</a>
|
|
87
|
-
<a name='L22'></a><a href='#L22'>22</a>
|
|
88
|
-
<a name='L23'></a><a href='#L23'>23</a>
|
|
89
|
-
<a name='L24'></a><a href='#L24'>24</a>
|
|
90
|
-
<a name='L25'></a><a href='#L25'>25</a>
|
|
91
|
-
<a name='L26'></a><a href='#L26'>26</a>
|
|
92
|
-
<a name='L27'></a><a href='#L27'>27</a>
|
|
93
|
-
<a name='L28'></a><a href='#L28'>28</a>
|
|
94
|
-
<a name='L29'></a><a href='#L29'>29</a>
|
|
95
|
-
<a name='L30'></a><a href='#L30'>30</a>
|
|
96
|
-
<a name='L31'></a><a href='#L31'>31</a>
|
|
97
|
-
<a name='L32'></a><a href='#L32'>32</a>
|
|
98
|
-
<a name='L33'></a><a href='#L33'>33</a>
|
|
99
|
-
<a name='L34'></a><a href='#L34'>34</a>
|
|
100
|
-
<a name='L35'></a><a href='#L35'>35</a></td><td class="line-coverage quiet"><span class="cline-any cline-yes">1x</span>
|
|
101
|
-
<span class="cline-any cline-yes">1x</span>
|
|
102
|
-
<span class="cline-any cline-yes">1x</span>
|
|
103
|
-
<span class="cline-any cline-yes">1x</span>
|
|
104
|
-
<span class="cline-any cline-yes">1x</span>
|
|
105
|
-
<span class="cline-any cline-yes">1x</span>
|
|
106
|
-
<span class="cline-any cline-yes">1x</span>
|
|
107
|
-
<span class="cline-any cline-yes">1x</span>
|
|
108
|
-
<span class="cline-any cline-yes">1x</span>
|
|
109
|
-
<span class="cline-any cline-yes">1x</span>
|
|
110
|
-
<span class="cline-any cline-yes">4x</span>
|
|
111
|
-
<span class="cline-any cline-yes">4x</span>
|
|
112
|
-
<span class="cline-any cline-yes">4x</span>
|
|
113
|
-
<span class="cline-any cline-yes">4x</span>
|
|
114
|
-
<span class="cline-any cline-yes">1x</span>
|
|
115
|
-
<span class="cline-any cline-yes">1x</span>
|
|
116
|
-
<span class="cline-any cline-yes">1x</span>
|
|
117
|
-
<span class="cline-any cline-yes">1x</span>
|
|
118
|
-
<span class="cline-any cline-yes">1x</span>
|
|
119
|
-
<span class="cline-any cline-yes">1x</span>
|
|
120
|
-
<span class="cline-any cline-yes">1x</span>
|
|
121
|
-
<span class="cline-any cline-yes">1x</span>
|
|
122
|
-
<span class="cline-any cline-yes">1x</span>
|
|
123
|
-
<span class="cline-any cline-yes">1x</span>
|
|
124
|
-
<span class="cline-any cline-yes">1x</span>
|
|
125
|
-
<span class="cline-any cline-yes">3x</span>
|
|
126
|
-
<span class="cline-any cline-yes">3x</span>
|
|
127
|
-
<span class="cline-any cline-yes">3x</span>
|
|
128
|
-
<span class="cline-any cline-yes">3x</span>
|
|
129
|
-
<span class="cline-any cline-yes">3x</span>
|
|
130
|
-
<span class="cline-any cline-yes">3x</span>
|
|
131
|
-
<span class="cline-any cline-yes">3x</span>
|
|
132
|
-
<span class="cline-any cline-yes">3x</span>
|
|
133
|
-
<span class="cline-any cline-yes">3x</span>
|
|
134
|
-
<span class="cline-any cline-neutral"> </span></td><td class="text"><pre class="prettyprint lang-js">/**
|
|
135
|
-
* Formats a given input string with numeric placeholders.
|
|
136
|
-
* @example
|
|
137
|
-
* // returns "Hello World"
|
|
138
|
-
* formatString("{0} {1}", ["Hello", "World"]);
|
|
139
|
-
* @param string The input string with placeholders.
|
|
140
|
-
* @param formatArguments An array of strings to place into the placeholders.
|
|
141
|
-
* @returns The formatted string.
|
|
142
|
-
*/
|
|
143
|
-
export const formatString = (string: string, ...formatArguments: Array<string>): string => {
|
|
144
|
-
return string.replace(/{(\d+)}/g, (match, matchedDigits: number): string =>
|
|
145
|
-
typeof formatArguments[matchedDigits] !== "undefined" ? formatArguments[matchedDigits] : match,
|
|
146
|
-
);
|
|
147
|
-
};
|
|
148
|
-
|
|
149
|
-
/**
|
|
150
|
-
* Formats a given input string with alphanumeric placeholders.
|
|
151
|
-
* @example
|
|
152
|
-
* // returns "Hello World"
|
|
153
|
-
* formatString("{first} {second}", {first:"Hello", second:"World"});
|
|
154
|
-
* @param string The input string with placeholders.
|
|
155
|
-
* @param parameters A hash of parameters to place in the placeholders.
|
|
156
|
-
* @returns The formatted string.
|
|
157
|
-
*/
|
|
158
|
-
export const formatStringTemplate = (
|
|
159
|
-
string: string,
|
|
160
|
-
parameters: Record<string, string | undefined>,
|
|
161
|
-
): string => {
|
|
162
|
-
string = string.replace(
|
|
163
|
-
/#{[\w.]+}/g,
|
|
164
|
-
query => parameters[query.slice(2, query.length - 1)] ?? "<missing parameter>",
|
|
165
|
-
);
|
|
166
|
-
return string;
|
|
167
|
-
};
|
|
168
|
-
</pre></td></tr></table></pre>
|
|
169
|
-
|
|
170
|
-
<div class='push'></div><!-- for sticky footer -->
|
|
171
|
-
</div><!-- /wrapper -->
|
|
172
|
-
<div class='footer quiet pad2 space-top1 center small'>
|
|
173
|
-
Code coverage generated by
|
|
174
|
-
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
175
|
-
at 2023-11-05T21:08:42.276Z
|
|
176
|
-
</div>
|
|
177
|
-
<script src="prettify.js"></script>
|
|
178
|
-
<script>
|
|
179
|
-
window.onload = function () {
|
|
180
|
-
prettyPrint();
|
|
181
|
-
};
|
|
182
|
-
</script>
|
|
183
|
-
<script src="sorter.js"></script>
|
|
184
|
-
<script src="block-navigation.js"></script>
|
|
185
|
-
</body>
|
|
186
|
-
</html>
|
|
187
|
-
|