UNPKG

synapse-react-client

Version:

[![npm version](https://badge.fury.io/js/synapse-react-client.svg)](https://badge.fury.io/js/synapse-react-client) [![code style: prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg?style=flat-square)](https://github.com/prettier/prettie

19 lines 1.32 kB
/** * Truncates a string to be a specified length, then optionally append a suffix. */ export declare function truncateString(str: string, maxLength: number, suffix?: string): string; export declare function hex2ascii(inputString: string): string; /** * Returns a hash code from a string. Uses Java's String.hashCode() algorithm: https://devdocs.io/openjdk~8/java/lang/string#hashCode-- * @param {String} str The string to hash. * @return {Number} A 32bit integer * @see https://stackoverflow.com/a/8831937 */ export declare function hashCode(str?: string | null): number; export declare function normalizeNumericId(id: string | number): number; export declare function validatePassword(newPassword: string): "A valid password must be at least 8 characters long" | "A valid password must include letters" | "A valid password must include digits (0-9)" | "A valid password must include special characters ~!@#$%^&*_-+=`|\\(){}[]:;\"'<>,.?/" | undefined; export declare function copyStringToClipboard(value: string): Promise<void>; export declare function replaceFileExtension(filePath: string, extension: string): string; export declare function stringListToArray(input: string): string[]; export declare function splitAndTrim(value: string, sep?: string): string[]; //# sourceMappingURL=StringUtils.d.ts.map