@vroskus/library-helpers 1.0.18 → 1.0.20

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.js CHANGED
@@ -31,8 +31,7 @@ const isEmptyString = (value) => {
31
31
  };
32
32
  const cleanFormValues = (data) => {
33
33
  const withoutHiddenItemsData = lodash_1.default.omitBy(data, (value, key) => lodash_1.default.startsWith(key, '_'));
34
- const cleanData = lodash_1.default.mapValues(withoutHiddenItemsData, (value) => (value === '' || isEmptyString(value) ? null : value));
35
- return cleanData;
34
+ return lodash_1.default.mapValues(withoutHiddenItemsData, (value) => (value === '' || isEmptyString(value) ? null : value));
36
35
  };
37
36
  exports.cleanFormValues = cleanFormValues;
38
37
  const animationClass = (name) => {
package/dist/common.d.ts CHANGED
@@ -1,13 +1,13 @@
1
1
  import type { RequestHandler } from 'express';
2
- export declare const getValue: <V extends string | void | null>(value: V, defaultValue: V) => V;
2
+ export declare const getValue: <V extends null | string | void>(value: V, defaultValue: V) => V;
3
3
  export declare const durationMiddleware: () => RequestHandler;
4
4
  export declare const getDuration: (start: [number, number] | void) => number;
5
- export declare const sortData: <D extends Record<string, unknown>[]>(data: D, field: Array<string> | string, reverse?: boolean) => Promise<D>;
5
+ export declare const sortData: <D extends Array<Record<string, unknown>>>(data: D, field: Array<string> | string, reverse?: boolean) => Promise<D>;
6
6
  export declare const getImageUrl: ({ cdnUrl, image, size, undefinedImage, }: {
7
7
  cdnUrl: string;
8
- image?: string | null | undefined;
9
- size: 'max' | 'mid' | 'min' | 'sqr';
10
- undefinedImage?: string | undefined;
8
+ image?: null | string;
9
+ size: "max" | "mid" | "min" | "sqr";
10
+ undefinedImage?: string;
11
11
  }) => string;
12
12
  export declare const getFileUrl: ({ cdnUrl, file, }: {
13
13
  cdnUrl: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vroskus/library-helpers",
3
- "version": "1.0.18",
3
+ "version": "1.0.20",
4
4
  "description": "Utility helpers",
5
5
  "author": "Vilius Roškus <info@regattas.eu>",
6
6
  "license": "MIT",
@@ -22,28 +22,19 @@
22
22
  "@types/express": "^4.17.21",
23
23
  "aigle": "^1.14.1",
24
24
  "aphrodite": "^2.4.0",
25
- "express": "^4.19.1",
25
+ "express": "^4.19.2",
26
26
  "lodash": "^4.17.21",
27
27
  "moment": "2.29.4",
28
- "query-string": "^9.0.0",
28
+ "query-string": "^9.1.0",
29
29
  "react-animations": "^1.0.0",
30
30
  "short-hash": "^1.0.0"
31
31
  },
32
32
  "devDependencies": {
33
33
  "@types/jest": "^29.5.12",
34
- "@types/lodash": "^4.17.0",
35
- "@types/node": "^20.11.30",
34
+ "@types/lodash": "^4.17.7",
35
+ "@types/node": "^22.4.1",
36
36
  "@types/query-string": "^6.3.0",
37
- "@typescript-eslint/eslint-plugin": "^7.3.1",
38
- "@typescript-eslint/parser": "^7.3.1",
39
- "eslint": "^8.57.0",
40
- "eslint-config-airbnb-base": "^15.0.0",
41
- "eslint-config-airbnb-typescript": "^18.0.0",
42
- "eslint-config-problems": "^8.0.0",
43
- "eslint-plugin-import": "^2.29.1",
44
- "eslint-plugin-import-newlines": "^1.4.0",
45
- "eslint-plugin-perfectionist": "^2.7.0",
46
- "eslint-plugin-react": "^7.34.1",
47
- "typescript": "^5.4.3"
37
+ "@vroskus/eslint-config": "^1.0.11",
38
+ "typescript": "^5.4.5"
48
39
  }
49
40
  }