mirror of
https://github.com/shlinkio/shlink-web-client.git
synced 2026-03-03 06:11:48 +00:00
Created helper curried function to compare two values
This commit is contained in:
@@ -24,3 +24,5 @@ export type OptionalString = Optional<string>;
|
||||
export const nonEmptyValueOrNull = <T>(value: T): T | null => (isEmpty(value) ? null : value);
|
||||
|
||||
export const capitalize = <T extends string>(value: T): string => `${value.charAt(0).toUpperCase()}${value.slice(1)}`;
|
||||
|
||||
export const equals = (value: any) => (otherValue: any) => value === otherValue;
|
||||
|
||||
Reference in New Issue
Block a user