@vroskus/library-helpers 1.0.17 → 1.0.19
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/browser.d.ts +1 -1
- package/dist/common.d.ts +1 -1
- package/dist/common.js +1 -1
- package/dist/index.js +1 -0
- package/package.json +8 -8
package/dist/browser.d.ts
CHANGED
|
@@ -2,6 +2,6 @@ export * from './common';
|
|
|
2
2
|
export declare const cleanFormValues: <D extends Record<string, unknown>>(data: Record<string, unknown>) => D;
|
|
3
3
|
type $AnimationName = 'fadeIn' | 'fadeInDown' | 'fadeInUp';
|
|
4
4
|
export declare const animationClass: (name: $AnimationName) => string;
|
|
5
|
-
export declare const getUrlGetParams: (input: string) => Record<string, string>;
|
|
5
|
+
export declare const getUrlGetParams: (input: string) => Record<string, null | string>;
|
|
6
6
|
export declare const scrollTop: (elementId?: string, offset?: number) => void;
|
|
7
7
|
export declare const scrollItem: (itemId: string, elementId: string, offset?: number) => void;
|
package/dist/common.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { RequestHandler } from 'express';
|
|
2
|
-
export declare const getValue: <V extends string | void>(value: V, defaultValue: V) => V;
|
|
2
|
+
export declare const getValue: <V extends string | void | null>(value: V, defaultValue: V) => V;
|
|
3
3
|
export declare const durationMiddleware: () => RequestHandler;
|
|
4
4
|
export declare const getDuration: (start: [number, number] | void) => number;
|
|
5
5
|
export declare const sortData: <D extends Record<string, unknown>[]>(data: D, field: Array<string> | string, reverse?: boolean) => Promise<D>;
|
package/dist/common.js
CHANGED
|
@@ -28,7 +28,7 @@ const getValue = (value, defaultValue) => {
|
|
|
28
28
|
exports.getValue = getValue;
|
|
29
29
|
const durationMiddleware = () => (req, res, next) => {
|
|
30
30
|
const start = process.hrtime();
|
|
31
|
-
req
|
|
31
|
+
lodash_1.default.set(req, 'start', start);
|
|
32
32
|
next();
|
|
33
33
|
};
|
|
34
34
|
exports.durationMiddleware = durationMiddleware;
|
package/dist/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vroskus/library-helpers",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.19",
|
|
4
4
|
"description": "Utility helpers",
|
|
5
5
|
"author": "Vilius Roškus <info@regattas.eu>",
|
|
6
6
|
"license": "MIT",
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
"@types/express": "^4.17.21",
|
|
23
23
|
"aigle": "^1.14.1",
|
|
24
24
|
"aphrodite": "^2.4.0",
|
|
25
|
-
"express": "^4.19.
|
|
25
|
+
"express": "^4.19.2",
|
|
26
26
|
"lodash": "^4.17.21",
|
|
27
27
|
"moment": "2.29.4",
|
|
28
28
|
"query-string": "^9.0.0",
|
|
@@ -31,19 +31,19 @@
|
|
|
31
31
|
},
|
|
32
32
|
"devDependencies": {
|
|
33
33
|
"@types/jest": "^29.5.12",
|
|
34
|
-
"@types/lodash": "^4.17.
|
|
35
|
-
"@types/node": "^20.
|
|
34
|
+
"@types/lodash": "^4.17.1",
|
|
35
|
+
"@types/node": "^20.12.10",
|
|
36
36
|
"@types/query-string": "^6.3.0",
|
|
37
|
-
"@typescript-eslint/eslint-plugin": "^7.
|
|
38
|
-
"@typescript-eslint/parser": "^7.
|
|
37
|
+
"@typescript-eslint/eslint-plugin": "^7.8.0",
|
|
38
|
+
"@typescript-eslint/parser": "^7.8.0",
|
|
39
39
|
"eslint": "^8.57.0",
|
|
40
40
|
"eslint-config-airbnb-base": "^15.0.0",
|
|
41
41
|
"eslint-config-airbnb-typescript": "^18.0.0",
|
|
42
42
|
"eslint-config-problems": "^8.0.0",
|
|
43
43
|
"eslint-plugin-import": "^2.29.1",
|
|
44
44
|
"eslint-plugin-import-newlines": "^1.4.0",
|
|
45
|
-
"eslint-plugin-perfectionist": "^2.
|
|
45
|
+
"eslint-plugin-perfectionist": "^2.10.0",
|
|
46
46
|
"eslint-plugin-react": "^7.34.1",
|
|
47
|
-
"typescript": "^5.4.
|
|
47
|
+
"typescript": "^5.4.5"
|
|
48
48
|
}
|
|
49
49
|
}
|