@zelgadis87/utils-core 4.11.0 → 4.11.2
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/tsconfig.tsbuildinfo +1 -1
- package/esbuild/index.cjs +59 -37
- package/esbuild/index.cjs.map +3 -3
- package/esbuild/index.mjs +49 -27
- package/esbuild/index.mjs.map +2 -2
- package/package.json +12 -12
- package/src/Logger.ts +2 -4
- package/dist/async/index.d.ts +0 -4
- package/dist/lazy/index.d.ts +0 -2
- package/dist/sorting/index.d.ts +0 -4
- package/dist/time/index.d.ts +0 -7
- package/dist/upgrade/index.d.ts +0 -2
- package/dist/utils/functions/pipedInvokeFromArray.d.ts +0 -2
- package/dist/utils/index.d.ts +0 -14
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json.schemastore.org/package",
|
|
3
3
|
"name": "@zelgadis87/utils-core",
|
|
4
|
-
"version": "4.11.
|
|
4
|
+
"version": "4.11.2",
|
|
5
5
|
"author": "Zelgadis87",
|
|
6
6
|
"license": "ISC",
|
|
7
7
|
"private": false,
|
|
@@ -19,18 +19,18 @@
|
|
|
19
19
|
}
|
|
20
20
|
},
|
|
21
21
|
"devDependencies": {
|
|
22
|
-
"@stylistic/eslint-plugin-ts": "2.
|
|
23
|
-
"@typescript-eslint/eslint-plugin": "8.
|
|
24
|
-
"@typescript-eslint/parser": "8.
|
|
25
|
-
"@vitest/coverage-v8": "
|
|
26
|
-
"@vitest/ui": "
|
|
27
|
-
"esbuild": "0.
|
|
28
|
-
"eslint": "9.
|
|
29
|
-
"nx": "20.
|
|
22
|
+
"@stylistic/eslint-plugin-ts": "4.2.0",
|
|
23
|
+
"@typescript-eslint/eslint-plugin": "8.26.1",
|
|
24
|
+
"@typescript-eslint/parser": "8.26.1",
|
|
25
|
+
"@vitest/coverage-v8": "3.0.8",
|
|
26
|
+
"@vitest/ui": "3.0.8",
|
|
27
|
+
"esbuild": "0.19.2",
|
|
28
|
+
"eslint": "9.22.0",
|
|
29
|
+
"nx": "20.6.0",
|
|
30
30
|
"rimraf": "6.0.1",
|
|
31
|
-
"typescript": "5.
|
|
32
|
-
"typescript-eslint": "8.
|
|
33
|
-
"vitest": "
|
|
31
|
+
"typescript": "5.8.2",
|
|
32
|
+
"typescript-eslint": "8.26.1",
|
|
33
|
+
"vitest": "3.0.8"
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
36
|
"small-date": "^2.0.1"
|
package/src/Logger.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import TimeInstant from "./time/TimeInstant";
|
|
2
|
-
import { noop } from "./utils/_index.js";
|
|
2
|
+
import { noop, padRight } from "./utils/_index.js";
|
|
3
3
|
|
|
4
4
|
const LEVELS = [ "log", "debug", "info", "warn", "error" ] as const;
|
|
5
5
|
type TLogLevel = keyof Console & typeof LEVELS[ number ]
|
|
@@ -34,11 +34,9 @@ export class Logger {
|
|
|
34
34
|
public get error() { return this.logWrap( 'error' ); }
|
|
35
35
|
|
|
36
36
|
private logWrap( methodName: TLogLevel ) {
|
|
37
|
-
if ( !this.console[ methodName ] )
|
|
38
|
-
throw new Error( 'Invalid method name: ' + methodName );
|
|
39
37
|
if ( !this.enabled || !this.console || LEVELS.indexOf( methodName ) < this.minLevel )
|
|
40
38
|
return noop;
|
|
41
|
-
return this.console[ methodName ].bind( this.console, timestamp(), methodName.toUpperCase(), this.name );
|
|
39
|
+
return this.console[ methodName ].bind( this.console, timestamp(), padRight( methodName.toUpperCase(), 5, ' ' ), this.name );
|
|
42
40
|
}
|
|
43
41
|
|
|
44
42
|
}
|
package/dist/async/index.d.ts
DELETED
package/dist/lazy/index.d.ts
DELETED
package/dist/sorting/index.d.ts
DELETED
package/dist/time/index.d.ts
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
export { default as RandomTimeDuration } from './RandomTimeDuration';
|
|
2
|
-
export { TPredefinedTimeDuration, TValidTimeDuration, TimeDuration, isAllowedTimeDuration } from './TimeDuration';
|
|
3
|
-
export { default as TimeFrequency } from './TimeFrequency';
|
|
4
|
-
export * from './TimeInstant';
|
|
5
|
-
export * from './TimeRange.js';
|
|
6
|
-
export { default as TimeUnit } from './TimeUnit';
|
|
7
|
-
export * from './types';
|
package/dist/upgrade/index.d.ts
DELETED
package/dist/utils/index.d.ts
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
export * from './arrays.js';
|
|
2
|
-
export * from './booleans.js';
|
|
3
|
-
export { TCssDeclarationRulesDictionary as TCSSDeclarationRulesDictionary, cssDeclarationRulesDictionaryToCss } from './css.js';
|
|
4
|
-
export * from './empties.js';
|
|
5
|
-
export * from './errors.js';
|
|
6
|
-
export * from './functions.js';
|
|
7
|
-
export * from './json.js';
|
|
8
|
-
export * from './nulls.js';
|
|
9
|
-
export * from './numbers.js';
|
|
10
|
-
export * from './primitives.js';
|
|
11
|
-
export * from './promises.js';
|
|
12
|
-
export * from './random.js';
|
|
13
|
-
export * from './records.js';
|
|
14
|
-
export * from './strings.js';
|