@bgord/tools 0.12.26 → 0.13.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/dist/clock.vo.d.ts +4 -2
- package/dist/clock.vo.js +7 -1
- package/dist/hour.vo.d.ts +2 -0
- package/dist/hour.vo.js +11 -11
- package/dist/index.d.ts +1 -2
- package/dist/index.js +1 -2
- package/dist/mean.service.js +1 -2
- package/dist/mime.vo.js +2 -4
- package/dist/min-max-scaler.service.js +5 -10
- package/dist/minute.vo.d.ts +1 -0
- package/dist/minute.vo.js +8 -10
- package/dist/money.vo.js +2 -4
- package/dist/outlier-detector.service.js +1 -2
- package/dist/percentage.service.js +1 -2
- package/dist/population-standard-deviation.service.js +1 -2
- package/dist/random.service.js +4 -8
- package/dist/reordering.service.js +3 -6
- package/dist/revision.vo.js +2 -4
- package/dist/simple-linear-regression.service.js +6 -12
- package/dist/stepper.service.js +2 -4
- package/dist/stopwatch.service.js +1 -2
- package/dist/timezone.vo.js +2 -6
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/visually-unambiguous-characters-generator.service.js +1 -4
- package/dist/weekday.vo.d.ts +40 -0
- package/dist/weekday.vo.js +95 -0
- package/dist/z-score.service.js +1 -2
- package/package.json +1 -1
- package/readme.md +1 -2
- package/src/clock.vo.ts +9 -2
- package/src/hour.vo.ts +15 -13
- package/src/index.ts +1 -2
- package/src/mean.service.ts +1 -3
- package/src/mime.vo.ts +2 -9
- package/src/min-max-scaler.service.ts +5 -16
- package/src/minute.vo.ts +9 -15
- package/src/money.vo.ts +2 -6
- package/src/outlier-detector.service.ts +1 -3
- package/src/percentage.service.ts +1 -5
- package/src/population-standard-deviation.service.ts +1 -3
- package/src/random.service.ts +5 -19
- package/src/rate-limiter.service.ts +0 -3
- package/src/reordering.service.ts +5 -13
- package/src/revision.vo.ts +2 -6
- package/src/simple-linear-regression.service.ts +6 -19
- package/src/stepper.service.ts +2 -8
- package/src/stopwatch.service.ts +1 -3
- package/src/timezone.vo.ts +2 -8
- package/src/visually-unambiguous-characters-generator.service.ts +1 -4
- package/src/weekday.vo.ts +113 -0
- package/src/z-score.service.ts +1 -3
- package/dist/build-version.vo.d.ts +0 -3
- package/dist/build-version.vo.js +0 -2
- package/dist/filter.vo.d.ts +0 -17
- package/dist/filter.vo.js +0 -22
- package/src/build-version.vo.ts +0 -5
- package/src/filter.vo.ts +0 -38
package/dist/filter.vo.d.ts
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import type { z } from "zod/v4";
|
|
2
|
-
export type DefaultFilterSchemaType = z.ZodRawShape;
|
|
3
|
-
export type FilterValuesType = Record<string, unknown>;
|
|
4
|
-
export type FilterSchemaType<T extends DefaultFilterSchemaType> = z.ZodObject<T>;
|
|
5
|
-
export type FilterParseConfigType<T extends DefaultFilterSchemaType> = {
|
|
6
|
-
schema: FilterSchemaType<T>;
|
|
7
|
-
values: FilterValuesType;
|
|
8
|
-
};
|
|
9
|
-
export declare class Filter<T extends DefaultFilterSchemaType> {
|
|
10
|
-
private readonly schema;
|
|
11
|
-
constructor(schema: FilterSchemaType<T>);
|
|
12
|
-
parse(values: FilterValuesType): z.core.$InferObjectOutput<T, {}> | undefined;
|
|
13
|
-
default(): z.core.$InferObjectOutput<T, {}> | undefined;
|
|
14
|
-
static parse<T extends DefaultFilterSchemaType>(config: FilterParseConfigType<T>): z.core.$InferObjectOutput<T, {}> | undefined;
|
|
15
|
-
static default<T extends DefaultFilterSchemaType>(config: Omit<FilterParseConfigType<T>, "values">): z.core.$InferObjectOutput<T, {}> | undefined;
|
|
16
|
-
private static _parse;
|
|
17
|
-
}
|
package/dist/filter.vo.js
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
export class Filter {
|
|
2
|
-
schema;
|
|
3
|
-
constructor(schema) {
|
|
4
|
-
this.schema = schema;
|
|
5
|
-
}
|
|
6
|
-
parse(values) {
|
|
7
|
-
return Filter._parse({ schema: this.schema, values });
|
|
8
|
-
}
|
|
9
|
-
default() {
|
|
10
|
-
return this.parse({});
|
|
11
|
-
}
|
|
12
|
-
static parse(config) {
|
|
13
|
-
return Filter._parse(config);
|
|
14
|
-
}
|
|
15
|
-
static default(config) {
|
|
16
|
-
return Filter._parse({ schema: config.schema, values: {} });
|
|
17
|
-
}
|
|
18
|
-
static _parse(config) {
|
|
19
|
-
const result = config.schema.safeParse(config.values);
|
|
20
|
-
return result.success ? result.data : undefined;
|
|
21
|
-
}
|
|
22
|
-
}
|
package/src/build-version.vo.ts
DELETED
package/src/filter.vo.ts
DELETED
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import type { z } from "zod/v4";
|
|
2
|
-
|
|
3
|
-
export type DefaultFilterSchemaType = z.ZodRawShape;
|
|
4
|
-
|
|
5
|
-
export type FilterValuesType = Record<string, unknown>;
|
|
6
|
-
|
|
7
|
-
export type FilterSchemaType<T extends DefaultFilterSchemaType> = z.ZodObject<T>;
|
|
8
|
-
|
|
9
|
-
export type FilterParseConfigType<T extends DefaultFilterSchemaType> = {
|
|
10
|
-
schema: FilterSchemaType<T>;
|
|
11
|
-
values: FilterValuesType;
|
|
12
|
-
};
|
|
13
|
-
|
|
14
|
-
export class Filter<T extends DefaultFilterSchemaType> {
|
|
15
|
-
constructor(private readonly schema: FilterSchemaType<T>) {}
|
|
16
|
-
|
|
17
|
-
parse(values: FilterValuesType) {
|
|
18
|
-
return Filter._parse({ schema: this.schema, values });
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
default() {
|
|
22
|
-
return this.parse({});
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
static parse<T extends DefaultFilterSchemaType>(config: FilterParseConfigType<T>) {
|
|
26
|
-
return Filter._parse(config);
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
static default<T extends DefaultFilterSchemaType>(config: Omit<FilterParseConfigType<T>, "values">) {
|
|
30
|
-
return Filter._parse({ schema: config.schema, values: {} });
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
private static _parse<T extends DefaultFilterSchemaType>(config: FilterParseConfigType<T>) {
|
|
34
|
-
const result = config.schema.safeParse(config.values);
|
|
35
|
-
|
|
36
|
-
return result.success ? result.data : undefined;
|
|
37
|
-
}
|
|
38
|
-
}
|