@tstdl/base 0.93.72 → 0.93.73
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/browser/pdf-options.d.ts +15 -13
- package/browser/pdf-options.js +14 -14
- package/collections/index.d.ts +0 -1
- package/collections/index.js +0 -1
- package/http/http.error.d.ts +12 -10
- package/http/http.error.js +11 -11
- package/image-service/image-service.d.ts +27 -23
- package/image-service/image-service.js +24 -26
- package/package.json +1 -1
- package/promise/deferred-promise.d.ts +7 -5
- package/promise/deferred-promise.js +6 -6
- package/signals/implementation/to-signal.js +6 -6
- package/sse/server-sent-events.d.ts +10 -14
- package/sse/server-sent-events.js +9 -15
- package/utils/alphabet.d.ts +14 -12
- package/utils/alphabet.js +13 -13
- package/utils/binary-search.d.ts +7 -0
- package/utils/binary-search.js +6 -6
- package/utils/index.d.ts +0 -3
- package/utils/index.js +0 -3
- package/utils/moving-metric.d.ts +14 -12
- package/utils/moving-metric.js +12 -12
- package/utils/url-builder.d.ts +6 -0
- package/utils/url-builder.js +5 -5
- package/collections/keyed-set.d.ts +0 -29
- package/collections/keyed-set.js +0 -78
- package/utils/event-loop.d.ts +0 -4
- package/utils/event-loop.js +0 -21
- package/utils/periodic-reporter.d.ts +0 -18
- package/utils/periodic-reporter.js +0 -64
- package/utils/periodic-sampler.d.ts +0 -22
- package/utils/periodic-sampler.js +0 -75
package/browser/pdf-options.d.ts
CHANGED
|
@@ -1,16 +1,18 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
1
|
+
import { type EnumType } from '../enumeration/enumeration.js';
|
|
2
|
+
export declare const PdfFormat: {
|
|
3
|
+
readonly Letter: "letter";
|
|
4
|
+
readonly Legal: "legal";
|
|
5
|
+
readonly Tabloid: "tabloid";
|
|
6
|
+
readonly Ledger: "ledger";
|
|
7
|
+
readonly A0: "a0";
|
|
8
|
+
readonly A1: "a1";
|
|
9
|
+
readonly A2: "a2";
|
|
10
|
+
readonly A3: "a3";
|
|
11
|
+
readonly A4: "a4";
|
|
12
|
+
readonly A5: "a5";
|
|
13
|
+
readonly A6: "a6";
|
|
14
|
+
};
|
|
15
|
+
export type PdfFormat = EnumType<typeof PdfFormat>;
|
|
14
16
|
export declare class PdfMarginObject {
|
|
15
17
|
top?: number | string;
|
|
16
18
|
bottom?: number | string;
|
package/browser/pdf-options.js
CHANGED
|
@@ -7,21 +7,21 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
7
7
|
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
8
8
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
9
9
|
};
|
|
10
|
+
import { defineEnum } from '../enumeration/enumeration.js';
|
|
10
11
|
import { Enumeration, Optional, Union } from '../schema/index.js';
|
|
11
|
-
export
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
})(PdfFormat || (PdfFormat = {}));
|
|
12
|
+
export const PdfFormat = defineEnum('PdfFormat', {
|
|
13
|
+
Letter: 'letter',
|
|
14
|
+
Legal: 'legal',
|
|
15
|
+
Tabloid: 'tabloid',
|
|
16
|
+
Ledger: 'ledger',
|
|
17
|
+
A0: 'a0',
|
|
18
|
+
A1: 'a1',
|
|
19
|
+
A2: 'a2',
|
|
20
|
+
A3: 'a3',
|
|
21
|
+
A4: 'a4',
|
|
22
|
+
A5: 'a5',
|
|
23
|
+
A6: 'a6',
|
|
24
|
+
});
|
|
25
25
|
export class PdfMarginObject {
|
|
26
26
|
top;
|
|
27
27
|
bottom;
|
package/collections/index.d.ts
CHANGED
package/collections/index.js
CHANGED
package/http/http.error.d.ts
CHANGED
|
@@ -1,19 +1,21 @@
|
|
|
1
|
+
import { type EnumType } from '../enumeration/enumeration.js';
|
|
1
2
|
import type { TypedOmit, UndefinableJson } from '../types/index.js';
|
|
2
3
|
import type { ErrorExtraInfo } from '../utils/format-error.js';
|
|
3
4
|
import { CustomError } from '../errors/custom.error.js';
|
|
4
5
|
import type { HttpClientRequest, HttpClientRequestObject, HttpClientResponse, HttpClientResponseObject } from './client/index.js';
|
|
5
|
-
export declare
|
|
6
|
-
Unknown
|
|
7
|
-
Cancelled
|
|
8
|
-
Network
|
|
9
|
-
InvalidRequest
|
|
10
|
-
StatusCode
|
|
6
|
+
export declare const HttpErrorReason: {
|
|
7
|
+
readonly Unknown: "Unknown";
|
|
8
|
+
readonly Cancelled: "Cancelled";
|
|
9
|
+
readonly Network: "Network";
|
|
10
|
+
readonly InvalidRequest: "InvalidRequest";
|
|
11
|
+
readonly StatusCode: "StatusCode";
|
|
11
12
|
/** Valid http response containing an error */
|
|
12
|
-
ErrorResponse
|
|
13
|
+
readonly ErrorResponse: "ErrorResponse";
|
|
13
14
|
/** Invalid http response */
|
|
14
|
-
ResponseError
|
|
15
|
-
Timeout
|
|
16
|
-
}
|
|
15
|
+
readonly ResponseError: "ResponseError";
|
|
16
|
+
readonly Timeout: "Timeout";
|
|
17
|
+
};
|
|
18
|
+
export type HttpErrorReason = EnumType<typeof HttpErrorReason>;
|
|
17
19
|
export declare class HttpError extends CustomError implements ErrorExtraInfo {
|
|
18
20
|
static readonly errorName = "HttpError";
|
|
19
21
|
readonly reason: HttpErrorReason;
|
package/http/http.error.js
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
|
+
import { defineEnum } from '../enumeration/enumeration.js';
|
|
1
2
|
import { propertyNameOf } from '../utils/object/property-name.js';
|
|
2
3
|
import { isDefined, isNotString, isString } from '../utils/type-guards.js';
|
|
3
4
|
import { CustomError } from '../errors/custom.error.js';
|
|
4
|
-
export
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
HttpErrorReason["StatusCode"] = "StatusCode";
|
|
5
|
+
export const HttpErrorReason = defineEnum('HttpErrorReason', {
|
|
6
|
+
Unknown: 'Unknown',
|
|
7
|
+
Cancelled: 'Cancelled',
|
|
8
|
+
Network: 'Network',
|
|
9
|
+
InvalidRequest: 'InvalidRequest',
|
|
10
|
+
StatusCode: 'StatusCode',
|
|
11
11
|
/** Valid http response containing an error */
|
|
12
|
-
|
|
12
|
+
ErrorResponse: 'ErrorResponse',
|
|
13
13
|
/** Invalid http response */
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
})
|
|
14
|
+
ResponseError: 'ResponseError',
|
|
15
|
+
Timeout: 'Timeout',
|
|
16
|
+
});
|
|
17
17
|
export class HttpError extends CustomError {
|
|
18
18
|
static errorName = 'HttpError';
|
|
19
19
|
reason;
|
|
@@ -1,26 +1,30 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
1
|
+
import { type EnumType } from '../enumeration/enumeration.js';
|
|
2
|
+
export declare const ImageResizeMode: {
|
|
3
|
+
readonly Fit: "fit";
|
|
4
|
+
readonly Fill: "fill";
|
|
5
|
+
};
|
|
6
|
+
export type ImageResizeMode = EnumType<typeof ImageResizeMode>;
|
|
7
|
+
export declare const ImageFormat: {
|
|
8
|
+
readonly Png: "png";
|
|
9
|
+
readonly Jpg: "jpg";
|
|
10
|
+
readonly Jpeg: "jpeg";
|
|
11
|
+
readonly Webp: "webp";
|
|
12
|
+
readonly Avif: "avif";
|
|
13
|
+
};
|
|
14
|
+
export type ImageFormat = EnumType<typeof ImageFormat>;
|
|
15
|
+
export declare const ImageOrigin: {
|
|
16
|
+
readonly Center: "center";
|
|
17
|
+
readonly Smart: "smart";
|
|
18
|
+
readonly Top: "top";
|
|
19
|
+
readonly Left: "left";
|
|
20
|
+
readonly Right: "right";
|
|
21
|
+
readonly Bottom: "bottom";
|
|
22
|
+
readonly TopLeft: "topleft";
|
|
23
|
+
readonly TopRight: "topright";
|
|
24
|
+
readonly BottomLeft: "bottomleft";
|
|
25
|
+
readonly BottomRight: "bottomright";
|
|
26
|
+
};
|
|
27
|
+
export type ImageOrigin = EnumType<typeof ImageOrigin>;
|
|
24
28
|
export declare class ImageOptions {
|
|
25
29
|
resizeMode?: ImageResizeMode;
|
|
26
30
|
width?: number;
|
|
@@ -7,33 +7,31 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
7
7
|
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
8
8
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
9
9
|
};
|
|
10
|
+
import { defineEnum } from '../enumeration/enumeration.js';
|
|
10
11
|
import { Enumeration, NumberProperty, Optional } from '../schema/index.js';
|
|
11
|
-
export
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
ImageOrigin["BottomLeft"] = "bottomleft";
|
|
35
|
-
ImageOrigin["BottomRight"] = "bottomright";
|
|
36
|
-
})(ImageOrigin || (ImageOrigin = {}));
|
|
12
|
+
export const ImageResizeMode = defineEnum('ImageResizeMode', {
|
|
13
|
+
Fit: 'fit',
|
|
14
|
+
Fill: 'fill',
|
|
15
|
+
});
|
|
16
|
+
export const ImageFormat = defineEnum('ImageFormat', {
|
|
17
|
+
Png: 'png',
|
|
18
|
+
Jpg: 'jpg',
|
|
19
|
+
Jpeg: 'jpeg',
|
|
20
|
+
Webp: 'webp',
|
|
21
|
+
Avif: 'avif',
|
|
22
|
+
});
|
|
23
|
+
export const ImageOrigin = defineEnum('ImageOrigin', {
|
|
24
|
+
Center: 'center',
|
|
25
|
+
Smart: 'smart',
|
|
26
|
+
Top: 'top',
|
|
27
|
+
Left: 'left',
|
|
28
|
+
Right: 'right',
|
|
29
|
+
Bottom: 'bottom',
|
|
30
|
+
TopLeft: 'topleft',
|
|
31
|
+
TopRight: 'topright',
|
|
32
|
+
BottomLeft: 'bottomleft',
|
|
33
|
+
BottomRight: 'bottomright',
|
|
34
|
+
});
|
|
37
35
|
export class ImageOptions {
|
|
38
36
|
resizeMode;
|
|
39
37
|
width;
|
package/package.json
CHANGED
|
@@ -1,9 +1,11 @@
|
|
|
1
|
+
import { type EnumType } from '../enumeration/enumeration.js';
|
|
1
2
|
import type { PromiseExecutor } from './types.js';
|
|
2
|
-
export declare const
|
|
3
|
-
Pending
|
|
4
|
-
Resolved
|
|
5
|
-
Rejected
|
|
6
|
-
}
|
|
3
|
+
export declare const PromiseState: {
|
|
4
|
+
readonly Pending: 0;
|
|
5
|
+
readonly Resolved: 1;
|
|
6
|
+
readonly Rejected: 2;
|
|
7
|
+
};
|
|
8
|
+
export type PromiseState = EnumType<typeof PromiseState>;
|
|
7
9
|
export declare class DeferredPromise<T = void> extends Promise<T> {
|
|
8
10
|
private backingPromise;
|
|
9
11
|
private resolvePromise;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
})
|
|
1
|
+
import { defineEnum } from '../enumeration/enumeration.js';
|
|
2
|
+
export const PromiseState = defineEnum('PromiseState', {
|
|
3
|
+
Pending: 0,
|
|
4
|
+
Resolved: 1,
|
|
5
|
+
Rejected: 2,
|
|
6
|
+
});
|
|
7
7
|
export class DeferredPromise extends Promise {
|
|
8
8
|
backingPromise;
|
|
9
9
|
resolvePromise;
|
|
@@ -3,6 +3,7 @@ import { registerFinalization } from '../../memory/finalization.js';
|
|
|
3
3
|
import { assertNotInReactiveContext } from './asserts.js';
|
|
4
4
|
import { computed } from './computed.js';
|
|
5
5
|
import { signal } from './writable-signal.js';
|
|
6
|
+
import { defineEnum } from '../../enumeration/enumeration.js';
|
|
6
7
|
/**
|
|
7
8
|
* Get the current value of an `Observable` as a reactive `Signal`.
|
|
8
9
|
*
|
|
@@ -72,9 +73,8 @@ export function toSignal(source, options) {
|
|
|
72
73
|
function makeToSignalEqual(userEquality = Object.is) {
|
|
73
74
|
return (a, b) => a.kind === StateKind.Value && b.kind === StateKind.Value && userEquality(a.value, b.value);
|
|
74
75
|
}
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
})(StateKind || (StateKind = {}));
|
|
76
|
+
const StateKind = defineEnum('StateKind', {
|
|
77
|
+
NoValue: 0,
|
|
78
|
+
Value: 1,
|
|
79
|
+
Error: 2,
|
|
80
|
+
});
|
|
@@ -1,21 +1,17 @@
|
|
|
1
|
+
import { type EnumType } from '../enumeration/enumeration.js';
|
|
1
2
|
import { type Observable } from 'rxjs';
|
|
2
3
|
/**
|
|
3
4
|
* Represents the possible states of a Server-Sent Events connection.
|
|
4
5
|
*/
|
|
5
|
-
export declare
|
|
6
|
-
/**
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
/**
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
/**
|
|
15
|
-
* The connection is closed.
|
|
16
|
-
*/
|
|
17
|
-
Closed = 2
|
|
18
|
-
}
|
|
6
|
+
export declare const ServerSentEventsState: {
|
|
7
|
+
/** The connection is currently being established. */
|
|
8
|
+
readonly Connecting: 0;
|
|
9
|
+
/** The connection is open and ready to receive events. */
|
|
10
|
+
readonly Open: 1;
|
|
11
|
+
/** The connection is closed. */
|
|
12
|
+
readonly Closed: 2;
|
|
13
|
+
};
|
|
14
|
+
export type ServerSentEventsState = EnumType<typeof ServerSentEventsState>;
|
|
19
15
|
/**
|
|
20
16
|
* A wrapper around the EventSource API, providing an RxJS-friendly interface for Server-Sent Events.
|
|
21
17
|
*/
|
|
@@ -1,23 +1,17 @@
|
|
|
1
|
+
import { defineEnum } from '../enumeration/enumeration.js';
|
|
1
2
|
import { NotSupportedError } from '../errors/not-supported.error.js';
|
|
2
3
|
import { ReplaySubject, distinctUntilChanged, filter, fromEvent, map, merge, share, shareReplay, startWith, takeUntil } from 'rxjs';
|
|
3
4
|
/**
|
|
4
5
|
* Represents the possible states of a Server-Sent Events connection.
|
|
5
6
|
*/
|
|
6
|
-
export
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
*/
|
|
15
|
-
ServerSentEventsState[ServerSentEventsState["Open"] = 1] = "Open";
|
|
16
|
-
/**
|
|
17
|
-
* The connection is closed.
|
|
18
|
-
*/
|
|
19
|
-
ServerSentEventsState[ServerSentEventsState["Closed"] = 2] = "Closed";
|
|
20
|
-
})(ServerSentEventsState || (ServerSentEventsState = {}));
|
|
7
|
+
export const ServerSentEventsState = defineEnum('ServerSentEventsState', {
|
|
8
|
+
/** The connection is currently being established. */
|
|
9
|
+
Connecting: 0,
|
|
10
|
+
/** The connection is open and ready to receive events. */
|
|
11
|
+
Open: 1,
|
|
12
|
+
/** The connection is closed. */
|
|
13
|
+
Closed: 2,
|
|
14
|
+
});
|
|
21
15
|
/**
|
|
22
16
|
* A wrapper around the EventSource API, providing an RxJS-friendly interface for Server-Sent Events.
|
|
23
17
|
*/
|
package/utils/alphabet.d.ts
CHANGED
|
@@ -1,12 +1,14 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
1
|
+
import { type EnumType } from '../enumeration/enumeration.js';
|
|
2
|
+
export declare const Alphabet: {
|
|
3
|
+
readonly LowerCase: "abcdefghijklmnopqrstuvwxyz";
|
|
4
|
+
readonly UpperCase: "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
|
|
5
|
+
readonly Numbers: "0123456789";
|
|
6
|
+
readonly LowerUpperCase: "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";
|
|
7
|
+
readonly LowerCaseNumbers: "abcdefghijklmnopqrstuvwxyz0123456789";
|
|
8
|
+
readonly UpperCaseNumbers: "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";
|
|
9
|
+
readonly LowerUpperCaseNumbers: "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";
|
|
10
|
+
readonly ZBase32: "ybndrfg8ejkmcpqxot1uwisza345h769";
|
|
11
|
+
readonly LowerCaseHex: "0123456789abcdef";
|
|
12
|
+
readonly UpperCaseHex: "0123456789ABCDEF";
|
|
13
|
+
};
|
|
14
|
+
export type Alphabet = EnumType<typeof Alphabet>;
|
package/utils/alphabet.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
})
|
|
1
|
+
import { defineEnum } from '../enumeration/enumeration.js';
|
|
2
|
+
export const Alphabet = defineEnum('Alphabet', {
|
|
3
|
+
LowerCase: 'abcdefghijklmnopqrstuvwxyz',
|
|
4
|
+
UpperCase: 'ABCDEFGHIJKLMNOPQRSTUVWXYZ',
|
|
5
|
+
Numbers: '0123456789',
|
|
6
|
+
LowerUpperCase: 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ',
|
|
7
|
+
LowerCaseNumbers: 'abcdefghijklmnopqrstuvwxyz0123456789',
|
|
8
|
+
UpperCaseNumbers: 'ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789',
|
|
9
|
+
LowerUpperCaseNumbers: 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789',
|
|
10
|
+
ZBase32: 'ybndrfg8ejkmcpqxot1uwisza345h769',
|
|
11
|
+
LowerCaseHex: '0123456789abcdef',
|
|
12
|
+
UpperCaseHex: '0123456789ABCDEF',
|
|
13
|
+
});
|
package/utils/binary-search.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { type EnumType } from '../enumeration/enumeration.js';
|
|
1
2
|
import type { Comparator } from './sort.js';
|
|
2
3
|
export type BinarySearchOptions = {
|
|
3
4
|
/** minimum index to search at */
|
|
@@ -5,6 +6,12 @@ export type BinarySearchOptions = {
|
|
|
5
6
|
/** maximum index to search at */
|
|
6
7
|
max?: number;
|
|
7
8
|
};
|
|
9
|
+
export declare const Position: {
|
|
10
|
+
readonly Undefined: 0;
|
|
11
|
+
readonly First: 1;
|
|
12
|
+
readonly Last: 2;
|
|
13
|
+
};
|
|
14
|
+
export type Position = EnumType<typeof Position>;
|
|
8
15
|
export declare function binarySearch<T extends TComparator, TComparator>(values: ArrayLike<T>, searchValue: TComparator, comparator?: Comparator<TComparator>, options?: BinarySearchOptions): number | undefined;
|
|
9
16
|
export declare function binarySearchFirst<T extends TComparator, TComparator>(values: ArrayLike<T>, searchValue: TComparator, comparator?: Comparator<TComparator>, options?: BinarySearchOptions): number | undefined;
|
|
10
17
|
export declare function binarySearchLast<T extends TComparator, TComparator>(values: ArrayLike<T>, searchValue: TComparator, comparator?: Comparator<TComparator>, options?: BinarySearchOptions): number | undefined;
|
package/utils/binary-search.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
+
import { defineEnum } from '../enumeration/enumeration.js';
|
|
1
2
|
import { compareByValue } from './comparison.js';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
})(Position || (Position = {}));
|
|
3
|
+
export const Position = defineEnum('Position', {
|
|
4
|
+
Undefined: 0,
|
|
5
|
+
First: 1,
|
|
6
|
+
Last: 2,
|
|
7
|
+
});
|
|
8
8
|
export function binarySearch(values, searchValue, comparator = compareByValue, options) {
|
|
9
9
|
return _binarySearch(values, searchValue, Position.Undefined, comparator, options);
|
|
10
10
|
}
|
package/utils/index.d.ts
CHANGED
|
@@ -16,7 +16,6 @@ export * from './date-time.js';
|
|
|
16
16
|
export * from './encoding.js';
|
|
17
17
|
export * from './enum.js';
|
|
18
18
|
export * from './equals.js';
|
|
19
|
-
export * from './event-loop.js';
|
|
20
19
|
export * from './factory-map.js';
|
|
21
20
|
export * from './feedable-async-iterable.js';
|
|
22
21
|
export * from './file-reader.js';
|
|
@@ -35,8 +34,6 @@ export * from './noop.js';
|
|
|
35
34
|
export * from './ordered-feedable-async-iterable.js';
|
|
36
35
|
export * from './patch-worker.js';
|
|
37
36
|
export * from './patterns.js';
|
|
38
|
-
export * from './periodic-reporter.js';
|
|
39
|
-
export * from './periodic-sampler.js';
|
|
40
37
|
export * from './provider-function-iterable.js';
|
|
41
38
|
export * from './proxy.js';
|
|
42
39
|
export * from './random.js';
|
package/utils/index.js
CHANGED
|
@@ -16,7 +16,6 @@ export * from './date-time.js';
|
|
|
16
16
|
export * from './encoding.js';
|
|
17
17
|
export * from './enum.js';
|
|
18
18
|
export * from './equals.js';
|
|
19
|
-
export * from './event-loop.js';
|
|
20
19
|
export * from './factory-map.js';
|
|
21
20
|
export * from './feedable-async-iterable.js';
|
|
22
21
|
export * from './file-reader.js';
|
|
@@ -35,8 +34,6 @@ export * from './noop.js';
|
|
|
35
34
|
export * from './ordered-feedable-async-iterable.js';
|
|
36
35
|
export * from './patch-worker.js';
|
|
37
36
|
export * from './patterns.js';
|
|
38
|
-
export * from './periodic-reporter.js';
|
|
39
|
-
export * from './periodic-sampler.js';
|
|
40
37
|
export * from './provider-function-iterable.js';
|
|
41
38
|
export * from './proxy.js';
|
|
42
39
|
export * from './random.js';
|
package/utils/moving-metric.d.ts
CHANGED
|
@@ -1,15 +1,17 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
1
|
+
import { type EnumType } from '../enumeration/enumeration.js';
|
|
2
|
+
export declare const MetricAggregation: {
|
|
3
|
+
readonly Sum: "sum";
|
|
4
|
+
readonly Mean: "mean";
|
|
5
|
+
readonly Median: "median";
|
|
6
|
+
readonly Minimum: "minimum";
|
|
7
|
+
readonly Maximum: "maximum";
|
|
8
|
+
readonly Count: "count";
|
|
9
|
+
readonly Quantile: "quantile";
|
|
10
|
+
readonly Rate: "rate";
|
|
11
|
+
readonly RateBySum: "rate-by-sum";
|
|
12
|
+
};
|
|
13
|
+
export type MetricAggregation = EnumType<typeof MetricAggregation>;
|
|
14
|
+
export type MetricAggregationOptions<T extends MetricAggregation> = T extends (typeof MetricAggregation)['Quantile'] ? {
|
|
13
15
|
scalar: number;
|
|
14
16
|
} : never;
|
|
15
17
|
export declare class MovingMetric {
|
package/utils/moving-metric.js
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
|
+
import { defineEnum } from '../enumeration/enumeration.js';
|
|
1
2
|
import { Timer } from './timer.js';
|
|
2
|
-
export
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
})(MetricAggregation || (MetricAggregation = {}));
|
|
3
|
+
export const MetricAggregation = defineEnum('MetricAggregation', {
|
|
4
|
+
Sum: 'sum',
|
|
5
|
+
Mean: 'mean',
|
|
6
|
+
Median: 'median',
|
|
7
|
+
Minimum: 'minimum',
|
|
8
|
+
Maximum: 'maximum',
|
|
9
|
+
Count: 'count',
|
|
10
|
+
Quantile: 'quantile',
|
|
11
|
+
Rate: 'rate',
|
|
12
|
+
RateBySum: 'rate-by-sum',
|
|
13
|
+
});
|
|
14
14
|
export class MovingMetric {
|
|
15
15
|
interval;
|
|
16
16
|
samples;
|
package/utils/url-builder.d.ts
CHANGED
|
@@ -1,4 +1,10 @@
|
|
|
1
|
+
import { type EnumType } from '../enumeration/index.js';
|
|
1
2
|
import type { UndefinableJsonObject, UndefinableJsonPrimitive } from '../types/index.js';
|
|
3
|
+
export declare const UrlBuilderPartType: {
|
|
4
|
+
readonly Literal: 0;
|
|
5
|
+
readonly Parameter: 1;
|
|
6
|
+
};
|
|
7
|
+
export type UrlBuilderPartType = EnumType<typeof UrlBuilderPartType>;
|
|
2
8
|
export type UrlBuilderParameterValue = UndefinableJsonPrimitive;
|
|
3
9
|
export type UrlBuilderParameters = UndefinableJsonObject;
|
|
4
10
|
export type UrlBuilderOptions = {
|
package/utils/url-builder.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
+
import { defineEnum } from '../enumeration/index.js';
|
|
1
2
|
import { normalizeSingleHttpValue } from '../http/types.js';
|
|
2
3
|
import { memoizeSingle } from './function/memoize.js';
|
|
3
4
|
import { isArray, isDefined, isObject, isUndefined } from './type-guards.js';
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
})(UrlBuilderPartType || (UrlBuilderPartType = {}));
|
|
5
|
+
export const UrlBuilderPartType = defineEnum('UrlBuilderPartType', {
|
|
6
|
+
Literal: 0,
|
|
7
|
+
Parameter: 1,
|
|
8
|
+
});
|
|
9
9
|
const urlParseRegex = /(?<literal>[^:]+|:\/+|:\d[^:]+)|:(?<parameter>[\w-]+)/ug;
|
|
10
10
|
export function compileUrlBuilder(url) {
|
|
11
11
|
const parts = [];
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
export declare enum KeyedSetMode {
|
|
2
|
-
Keep = 0,
|
|
3
|
-
Overwrite = 1
|
|
4
|
-
}
|
|
5
|
-
export type Selector<T> = (value: T) => any;
|
|
6
|
-
export declare class KeyedSet<T> implements Set<T> {
|
|
7
|
-
private readonly selector;
|
|
8
|
-
private readonly mode;
|
|
9
|
-
private readonly backingMap;
|
|
10
|
-
readonly [Symbol.toStringTag]: 'KeyedSet';
|
|
11
|
-
constructor(selector: Selector<T>, mode?: KeyedSetMode);
|
|
12
|
-
get size(): number;
|
|
13
|
-
add(value: T): this;
|
|
14
|
-
clear(): void;
|
|
15
|
-
delete(value: T): boolean;
|
|
16
|
-
union<U>(_other: ReadonlySetLike<U>): Set<T | U>;
|
|
17
|
-
intersection<U>(_other: ReadonlySetLike<U>): Set<T & U>;
|
|
18
|
-
difference<U>(_other: ReadonlySetLike<U>): Set<T>;
|
|
19
|
-
symmetricDifference<U>(_other: ReadonlySetLike<U>): Set<T | U>;
|
|
20
|
-
isSubsetOf(_other: ReadonlySetLike<unknown>): boolean;
|
|
21
|
-
isSupersetOf(_other: ReadonlySetLike<unknown>): boolean;
|
|
22
|
-
isDisjointFrom(_other: ReadonlySetLike<unknown>): boolean;
|
|
23
|
-
forEach(callback: (value: T, value2: T, set: KeyedSet<T>) => void, thisArg?: any): void;
|
|
24
|
-
has(value: T): boolean;
|
|
25
|
-
[Symbol.iterator](): SetIterator<T>;
|
|
26
|
-
entries(): SetIterator<[T, T]>;
|
|
27
|
-
keys(): SetIterator<T>;
|
|
28
|
-
values(): SetIterator<T>;
|
|
29
|
-
}
|
package/collections/keyed-set.js
DELETED
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
import { NotSupportedError } from '../errors/not-supported.error.js';
|
|
2
|
-
import { map } from '../utils/iterable-helpers/map.js';
|
|
3
|
-
export var KeyedSetMode;
|
|
4
|
-
(function (KeyedSetMode) {
|
|
5
|
-
KeyedSetMode[KeyedSetMode["Keep"] = 0] = "Keep";
|
|
6
|
-
KeyedSetMode[KeyedSetMode["Overwrite"] = 1] = "Overwrite";
|
|
7
|
-
})(KeyedSetMode || (KeyedSetMode = {}));
|
|
8
|
-
export class KeyedSet {
|
|
9
|
-
selector;
|
|
10
|
-
mode;
|
|
11
|
-
backingMap;
|
|
12
|
-
[Symbol.toStringTag];
|
|
13
|
-
constructor(selector, mode = KeyedSetMode.Overwrite) {
|
|
14
|
-
this.selector = selector;
|
|
15
|
-
this.mode = mode;
|
|
16
|
-
this[Symbol.toStringTag] = 'KeyedSet';
|
|
17
|
-
this.backingMap = new Map();
|
|
18
|
-
}
|
|
19
|
-
get size() {
|
|
20
|
-
return this.backingMap.size;
|
|
21
|
-
}
|
|
22
|
-
add(value) {
|
|
23
|
-
const key = this.selector(value);
|
|
24
|
-
if (this.mode == KeyedSetMode.Keep && this.backingMap.has(key)) {
|
|
25
|
-
return this;
|
|
26
|
-
}
|
|
27
|
-
this.backingMap.set(key, value);
|
|
28
|
-
return this;
|
|
29
|
-
}
|
|
30
|
-
clear() {
|
|
31
|
-
this.backingMap.clear();
|
|
32
|
-
}
|
|
33
|
-
delete(value) {
|
|
34
|
-
const key = this.selector(value);
|
|
35
|
-
return this.backingMap.delete(key);
|
|
36
|
-
}
|
|
37
|
-
union(_other) {
|
|
38
|
-
throw new NotSupportedError();
|
|
39
|
-
}
|
|
40
|
-
intersection(_other) {
|
|
41
|
-
throw new NotSupportedError();
|
|
42
|
-
}
|
|
43
|
-
difference(_other) {
|
|
44
|
-
throw new NotSupportedError();
|
|
45
|
-
}
|
|
46
|
-
symmetricDifference(_other) {
|
|
47
|
-
throw new NotSupportedError();
|
|
48
|
-
}
|
|
49
|
-
isSubsetOf(_other) {
|
|
50
|
-
throw new NotSupportedError();
|
|
51
|
-
}
|
|
52
|
-
isSupersetOf(_other) {
|
|
53
|
-
throw new NotSupportedError();
|
|
54
|
-
}
|
|
55
|
-
isDisjointFrom(_other) {
|
|
56
|
-
throw new NotSupportedError();
|
|
57
|
-
}
|
|
58
|
-
forEach(callback, thisArg) {
|
|
59
|
-
const boundCallback = callback.bind(thisArg);
|
|
60
|
-
this.backingMap.forEach((value) => boundCallback(value, value, this));
|
|
61
|
-
}
|
|
62
|
-
has(value) {
|
|
63
|
-
const key = this.selector(value);
|
|
64
|
-
return this.backingMap.has(key);
|
|
65
|
-
}
|
|
66
|
-
[Symbol.iterator]() {
|
|
67
|
-
return this.backingMap.values();
|
|
68
|
-
}
|
|
69
|
-
*entries() {
|
|
70
|
-
yield* map(this.backingMap.values(), (value) => [value, value]);
|
|
71
|
-
}
|
|
72
|
-
keys() {
|
|
73
|
-
return this.backingMap.values();
|
|
74
|
-
}
|
|
75
|
-
values() {
|
|
76
|
-
return this.backingMap.values();
|
|
77
|
-
}
|
|
78
|
-
}
|
package/utils/event-loop.d.ts
DELETED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import type { CancellationSignal } from '../cancellation/token.js';
|
|
2
|
-
import type { Logger } from '../logger/index.js';
|
|
3
|
-
export declare function measureEventLoopDelay(): Promise<number>;
|
|
4
|
-
export declare function runEventLoopWatcher(logger: Logger, cancellationSignal: CancellationSignal): void;
|
package/utils/event-loop.js
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { formatDuration } from './format.js';
|
|
2
|
-
import { AggregationMode, PeriodicSampler } from './periodic-sampler.js';
|
|
3
|
-
import { Timer } from './timer.js';
|
|
4
|
-
export async function measureEventLoopDelay() {
|
|
5
|
-
return new Promise((resolve) => {
|
|
6
|
-
const stopwatch = new Timer();
|
|
7
|
-
setImmediate(() => {
|
|
8
|
-
stopwatch.start();
|
|
9
|
-
// inner setImmediate, to measure an full event-loop-cycle
|
|
10
|
-
setImmediate(() => resolve(stopwatch.milliseconds));
|
|
11
|
-
});
|
|
12
|
-
});
|
|
13
|
-
}
|
|
14
|
-
export function runEventLoopWatcher(logger, cancellationSignal) {
|
|
15
|
-
const sampler = new PeriodicSampler(measureEventLoopDelay, 50);
|
|
16
|
-
sampler
|
|
17
|
-
.watch(0, 100, AggregationMode.ThirdQuartile)
|
|
18
|
-
.subscribe((delay) => logger.debug(`eventloop: ${formatDuration(delay, 2)}`));
|
|
19
|
-
sampler.start();
|
|
20
|
-
void cancellationSignal.then(async () => sampler.stop());
|
|
21
|
-
}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { type Observable } from 'rxjs';
|
|
2
|
-
export declare class PeriodicReporter {
|
|
3
|
-
private readonly reportSubject;
|
|
4
|
-
private readonly interval;
|
|
5
|
-
private readonly ignoreZero;
|
|
6
|
-
private readonly resetAfterReport;
|
|
7
|
-
private readonly stopToken;
|
|
8
|
-
private readonly stopped;
|
|
9
|
-
private running;
|
|
10
|
-
private counter;
|
|
11
|
-
private stopRequested;
|
|
12
|
-
get report(): Observable<number>;
|
|
13
|
-
constructor(interval: number, ignoreZero: boolean, resetAfterReport: boolean);
|
|
14
|
-
increase(count: number): void;
|
|
15
|
-
run(): void;
|
|
16
|
-
stop(): Promise<void>;
|
|
17
|
-
private emitReport;
|
|
18
|
-
}
|
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
import { Subject } from 'rxjs';
|
|
2
|
-
import { CancellationToken } from '../cancellation/token.js';
|
|
3
|
-
import { DeferredPromise } from '../promise/deferred-promise.js';
|
|
4
|
-
import { cancelableTimeout } from './timing.js';
|
|
5
|
-
export class PeriodicReporter {
|
|
6
|
-
reportSubject;
|
|
7
|
-
interval;
|
|
8
|
-
ignoreZero;
|
|
9
|
-
resetAfterReport;
|
|
10
|
-
stopToken;
|
|
11
|
-
stopped;
|
|
12
|
-
running;
|
|
13
|
-
counter;
|
|
14
|
-
stopRequested;
|
|
15
|
-
get report() {
|
|
16
|
-
return this.reportSubject.asObservable();
|
|
17
|
-
}
|
|
18
|
-
constructor(interval, ignoreZero, resetAfterReport) {
|
|
19
|
-
this.interval = interval;
|
|
20
|
-
this.ignoreZero = ignoreZero;
|
|
21
|
-
this.resetAfterReport = resetAfterReport;
|
|
22
|
-
this.running = false;
|
|
23
|
-
this.stopToken = new CancellationToken();
|
|
24
|
-
this.stopped = new DeferredPromise();
|
|
25
|
-
this.reportSubject = new Subject();
|
|
26
|
-
}
|
|
27
|
-
increase(count) {
|
|
28
|
-
this.counter += count;
|
|
29
|
-
}
|
|
30
|
-
run() {
|
|
31
|
-
if (this.running) {
|
|
32
|
-
throw new Error('already started');
|
|
33
|
-
}
|
|
34
|
-
this.running = true;
|
|
35
|
-
void (async () => {
|
|
36
|
-
this.counter = 0;
|
|
37
|
-
this.stopRequested = false;
|
|
38
|
-
this.stopToken.unset();
|
|
39
|
-
this.stopped.reset();
|
|
40
|
-
while (!this.stopRequested) { // eslint-disable-line @typescript-eslint/no-unnecessary-condition
|
|
41
|
-
await cancelableTimeout(this.interval, this.stopToken);
|
|
42
|
-
if (!this.stopRequested && (!this.ignoreZero || (this.counter > 0))) { // eslint-disable-line @typescript-eslint/no-unnecessary-condition
|
|
43
|
-
this.emitReport(this.resetAfterReport);
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
this.running = false;
|
|
47
|
-
this.stopped.resolve();
|
|
48
|
-
})();
|
|
49
|
-
}
|
|
50
|
-
async stop() {
|
|
51
|
-
if (!this.running) {
|
|
52
|
-
return;
|
|
53
|
-
}
|
|
54
|
-
this.stopRequested = true;
|
|
55
|
-
this.stopToken.set();
|
|
56
|
-
await this.stopped;
|
|
57
|
-
}
|
|
58
|
-
emitReport(resetAfterReport) {
|
|
59
|
-
this.reportSubject.next(this.counter);
|
|
60
|
-
if (resetAfterReport) {
|
|
61
|
-
this.counter = 0;
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { type Observable } from 'rxjs';
|
|
2
|
-
export declare enum AggregationMode {
|
|
3
|
-
Minimum = 0,
|
|
4
|
-
Maximum = 1,
|
|
5
|
-
Mean = 2,
|
|
6
|
-
Median = 3,
|
|
7
|
-
FirstQuartile = 4,
|
|
8
|
-
ThirdQuartile = 5
|
|
9
|
-
}
|
|
10
|
-
export type SampleFunction = () => number | Promise<number>;
|
|
11
|
-
export declare class PeriodicSampler {
|
|
12
|
-
private readonly sampleFunction;
|
|
13
|
-
private readonly subject;
|
|
14
|
-
private run;
|
|
15
|
-
private stopped;
|
|
16
|
-
sampleInterval: number;
|
|
17
|
-
constructor(sampleFunction: SampleFunction, sampleInterval?: number);
|
|
18
|
-
start(): void;
|
|
19
|
-
stop(): Promise<void>;
|
|
20
|
-
watch(threshold?: number, samples?: number, aggregation?: AggregationMode): Observable<number>;
|
|
21
|
-
private runSampleLoop;
|
|
22
|
-
}
|
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
import { Subject, bufferCount, filter, map } from 'rxjs';
|
|
2
|
-
import { compareByValue } from './comparison.js';
|
|
3
|
-
import { average } from './math.js';
|
|
4
|
-
import { timeout } from './timing.js';
|
|
5
|
-
export var AggregationMode;
|
|
6
|
-
(function (AggregationMode) {
|
|
7
|
-
AggregationMode[AggregationMode["Minimum"] = 0] = "Minimum";
|
|
8
|
-
AggregationMode[AggregationMode["Maximum"] = 1] = "Maximum";
|
|
9
|
-
AggregationMode[AggregationMode["Mean"] = 2] = "Mean";
|
|
10
|
-
AggregationMode[AggregationMode["Median"] = 3] = "Median";
|
|
11
|
-
AggregationMode[AggregationMode["FirstQuartile"] = 4] = "FirstQuartile";
|
|
12
|
-
AggregationMode[AggregationMode["ThirdQuartile"] = 5] = "ThirdQuartile";
|
|
13
|
-
})(AggregationMode || (AggregationMode = {}));
|
|
14
|
-
export class PeriodicSampler {
|
|
15
|
-
sampleFunction;
|
|
16
|
-
subject;
|
|
17
|
-
run;
|
|
18
|
-
stopped;
|
|
19
|
-
sampleInterval;
|
|
20
|
-
constructor(sampleFunction, sampleInterval = 100) {
|
|
21
|
-
this.sampleFunction = sampleFunction;
|
|
22
|
-
this.sampleInterval = sampleInterval;
|
|
23
|
-
this.run = false;
|
|
24
|
-
this.subject = new Subject();
|
|
25
|
-
}
|
|
26
|
-
start() {
|
|
27
|
-
if (this.run) {
|
|
28
|
-
throw new Error('already started');
|
|
29
|
-
}
|
|
30
|
-
this.run = true;
|
|
31
|
-
this.stopped = this.runSampleLoop();
|
|
32
|
-
}
|
|
33
|
-
async stop() {
|
|
34
|
-
this.run = false;
|
|
35
|
-
await this.stopped;
|
|
36
|
-
}
|
|
37
|
-
watch(threshold = 0, samples = 1, aggregation = AggregationMode.Maximum) {
|
|
38
|
-
const observable = this.subject.pipe(bufferCount(samples), map((measures) => aggregate(aggregation, measures)), filter((ms) => ms >= threshold));
|
|
39
|
-
return observable;
|
|
40
|
-
}
|
|
41
|
-
async runSampleLoop() {
|
|
42
|
-
while (this.run) {
|
|
43
|
-
const delay = await this.sampleFunction();
|
|
44
|
-
this.subject.next(delay);
|
|
45
|
-
await timeout(this.sampleInterval);
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
function aggregate(aggregation, values) {
|
|
50
|
-
switch (aggregation) {
|
|
51
|
-
case AggregationMode.Minimum:
|
|
52
|
-
return Math.min(...values);
|
|
53
|
-
case AggregationMode.Maximum:
|
|
54
|
-
return Math.max(...values);
|
|
55
|
-
case AggregationMode.Mean:
|
|
56
|
-
return average(values);
|
|
57
|
-
case AggregationMode.Median: {
|
|
58
|
-
values.sort(compareByValue);
|
|
59
|
-
const median = Math.floor(values.length / 2);
|
|
60
|
-
return values[median];
|
|
61
|
-
}
|
|
62
|
-
case AggregationMode.FirstQuartile: {
|
|
63
|
-
values.sort(compareByValue);
|
|
64
|
-
const firstQuartile = Math.floor(values.length / 4 * 1);
|
|
65
|
-
return values[firstQuartile];
|
|
66
|
-
}
|
|
67
|
-
case AggregationMode.ThirdQuartile: {
|
|
68
|
-
values.sort(compareByValue);
|
|
69
|
-
const thirdQuartile = Math.floor(values.length / 4 * 3);
|
|
70
|
-
return values[thirdQuartile];
|
|
71
|
-
}
|
|
72
|
-
default:
|
|
73
|
-
throw new Error(`aggregation mode ${aggregation} not implemented`);
|
|
74
|
-
}
|
|
75
|
-
}
|