native-pytech 1.0.17 → 1.0.18
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.
|
@@ -4,6 +4,7 @@ export declare const addProps: (element: React.ReactElement | null, additionalSt
|
|
|
4
4
|
export declare const numberFormat: (value: number) => string;
|
|
5
5
|
export declare const numberFormatInverted: (value: string) => number;
|
|
6
6
|
export declare const formatDate: (value: string) => string;
|
|
7
|
+
export declare const isValidMail: (mail: string) => boolean;
|
|
7
8
|
export declare function applyOpacity(color: string, opacity: number): string;
|
|
8
9
|
export declare function adjustLightness(color: string, percentage: number): string;
|
|
9
10
|
export declare const _getDeviceTier: () => "low" | "medium" | "high";
|
|
@@ -44,6 +44,9 @@ export const formatDate = (value) => {
|
|
|
44
44
|
}).format(date);
|
|
45
45
|
return `${monthText} ${dayText}, ${yearText}`;
|
|
46
46
|
};
|
|
47
|
+
export const isValidMail = (mail) => {
|
|
48
|
+
return mail.includes('@') && mail.endsWith('.com');
|
|
49
|
+
};
|
|
47
50
|
export function applyOpacity(color, opacity) {
|
|
48
51
|
try {
|
|
49
52
|
const [r, g, b] = parseToRgba(color); // ignoro alpha original
|