export {}; import { Utils } from '../BaseUtils'; export declare class DataUtils extends Utils { constructor(); /** * @description Compare two objects and return the difference * @param {object} obj1 - The first object to compare. * @param {object} obj2 - The second object to compare. * @param {array} exclude - An array of keys to exclude from the comparison. * @returns {object|boolean} - Returns the difference between the two objects or false if there is no difference. */ compareObjects: (obj1: Record, obj2: Record, exclude?: Array) => Record | Boolean; /** * @description Validate JSON against a schema * @param {string|object} json - The JSON (or object) to validate. * @param {string|object} schema - The JSON schema (or object) to validate against. * @returns {boolean|object} - Returns true if valid or an object of issues. */ validateJson: (json: string | object, schema: string | object) => boolean | string[]; /** * @description Converts a string to camel-case * @param {string} str - The string to be converted * @returns {string} - Returns string formatted as camel-case */ toCamelCase: (str: string) => string; /** * @description Converts a string in camel-case to snake-case * @param {string} str - The camel-case string to be converted * @returns {string} - Returns string formatted as snake-case */ camelToSnake: (str: string) => string; /** * @description Removes hyphens * @param {string} str - Source string * @returns {string} - Returns string without hyphens */ hyphenToNull: (str: string) => string; /** * @description Replaces hyphens with spaces * @param {string} str - Source string * @returns {string} - Returns string without hyphens */ hyphenToSpace: (str: string) => string; /** * @description Replaces underscores with spaces * @param {string} str - Source string * @returns {string} - Returns string without underscores */ underscoreToSpace: (str: string) => string; /** * @description Replaces spaces with hyphens * @param {string} str - Source string * @returns {string} - Returns string with hyphens */ spaceToHyphen: (str: string) => string; /** * @description Changes camel or pascal case to capitalized words * @param {string} str - Source string * @returns {string} - Returns converted string */ toRegularForm: (str: string) => string; /** * @description Prepend prefix to converted snake case string * @param {string} str - Source string * @returns {string} - Returns converted string */ prefixSnakeCase: (pre: string, str: string) => string; /** * @description Parses intials from a "name" string * @param {string} str - Name string (e.g. "John Hancock", "John", "John Tyler Smith") * @returns {string} - Returns initials */ parseInitials: (str: string) => string; /** * @description Provides ordinal of a number * @param {number} num - Number to be converted to ordinal * @param {boolean} isUpperCase - Set to uppercase when true or lowercase when not true * @returns {string} - Returns ordinal string */ numToOrdinal: (num: number, isUpperCase: boolean) => string; } //# sourceMappingURL=index.d.ts.map