UNPKG

@salespark/toolkit

Version:

Collection of utility functions and helpers, designed to speed up development across SalesPark projects. Includes common helpers, reusable patterns, and extended functions.

685 lines (674 loc) 30.4 kB
/****************************************************** * ##: Unique by Key * Returns unique items in an array based on a computed key * @param {Array<T>} arr - The array to process * @param {Function} key - Function to compute the key for uniqueness * History: * 21-08-2025: Created ****************************************************/ declare function uniqBy<T, K>(arr: T[], key: (v: T) => K): T[]; /****************************************************** * ##: Array Chunk * Splits an array into equally sized pieces * @param {Array<T>} arr - The array to chunk * @param {Number} size - Size of each chunk * History: * 21-08-2025: Created ****************************************************/ declare function chunk<T>(arr: T[], size: number): T[][]; /****************************************************** * ##: Deep Array Equality * Deeply compares two arrays for equality, ignoring element order and property order in nested objects * * Notes: * - Uses JSON.stringify as the final canonical representation. * - Will return false on non-serializable inputs (e.g., circular structures). * - For primitives like NaN/Infinity, JSON.stringify follows JS semantics (NaN -> null). * @param {Array<T>} arr1 - First array to compare * @param {Array<T>} arr2 - Second array to compare * History: * 21-08-2025: Created ****************************************************/ declare function areArraysEqual<T = unknown>(arr1: T[], arr2: T[]): boolean; /** * @deprecated Use `areArraysEqual` instead. */ declare const areArraysDeepEqualUnordered: typeof areArraysEqual; /****************************************************** * ##: Unique Values * Removes duplicate values from an array * @param {Array<T>} arr - The array to process * History: * 21-08-2025: Created ****************************************************/ declare function uniq<T>(arr: T[]): T[]; /****************************************************** * ##: Flatten Array * Flattens nested arrays into a single array (1 level deep) * @param {Array<any>} arr - The array to flatten * History: * 21-08-2025: Created ****************************************************/ declare function flatten<T>(arr: any[]): T[]; /****************************************************** * ##: Group By * Groups array items by a key or function * @param {Array<T>} arr - The array to group * @param {Function|String} key - Key or function to group by * History: * 21-08-2025: Created ****************************************************/ declare function groupBy<T, K extends keyof any>(arr: T[], key: ((item: T) => K) | K): Record<string, T[]>; /****************************************************** * ##: Sort By * Sorts array by a key or function * @param {Array<T>} arr - The array to sort * @param {Function|String} key - Key or function to sort by * History: * 21-08-2025: Created ****************************************************/ declare function sortBy<T>(arr: T[], key: ((item: T) => any) | keyof T): T[]; /****************************************************** * ##: Array Difference * Returns elements in arr1 not present in arr2 * @param {Array<T>} arr1 - First array * @param {Array<T>} arr2 - Second array * History: * 21-08-2025: Created ****************************************************/ declare function difference<T>(arr1: T[], arr2: T[]): T[]; /****************************************************** * ##: Array Intersection * Returns elements common to both arrays * @param {Array<T>} arr1 - First array * @param {Array<T>} arr2 - Second array * History: * 21-08-2025: Created ****************************************************/ declare function intersection<T>(arr1: T[], arr2: T[]): T[]; /****************************************************** * ##: Compact Array * Removes falsy values from array * @param {Array<T>} arr - The array to compact * History: * 21-08-2025: Created ****************************************************/ declare function compact<T>(arr: T[]): T[]; /****************************************************** * ##: Pluck Property * Extracts a property from each object in array * @param {Array<T>} arr - The array of objects * @param {String} key - Property name to extract * History: * 21-08-2025: Created ****************************************************/ declare function pluck<T, K extends keyof T>(arr: T[], key: K): Array<T[K]>; /****************************************************** * ##: Shuffle Array * Shuffles array elements randomly * @param {Array<T>} arr - The array to shuffle * History: * 21-08-2025: Created ****************************************************/ declare function shuffle<T>(arr: T[]): T[]; /** **************************************************** * ##: Flattenable Value Checker * Checks if a value can be flattened (array, arguments, or marked spreadable) * * Notes: * Mirrors lodash's behavior: checks Array.isArray, arguments object, and Symbol.isConcatSpreadable. * @param {unknown} value - Value to check for flattenability * History: * 21-08-2025: Created ****************************************************/ declare function isFlattenable(value: unknown): value is readonly unknown[]; /** **************************************************** * ##: Array Push All * Appends all values into array in-place (similar to lodash arrayPush) * @param {Array<T>} array - Target array * @param {Array<T>} values - Values to append * History: * 21-08-2025: Created ****************************************************/ declare function pushAll<T>(array: T[], values: readonly T[]): T[]; /** **************************************************** * ##: Base Array Flatten * Base flatten routine with configurable depth and predicate * * Notes: * Allows control of depth, predicate, and strict mode. Used internally for flattening. * @param {Array} array - Input array * @param {Number} depth - Maximum recursion depth * @param {Function} predicate - Function to determine if value is flattenable * @param {Boolean} isStrict - If true, only flattenable values are kept * @param {Array} result - Optional accumulator (internal) * @returns {Array} New flattened array * History: * 21-08-2025: Created ****************************************************/ declare function flattenDepthBase<T>(array: readonly unknown[], depth: number, predicate?: (v: unknown) => boolean, isStrict?: boolean, result?: T[]): T[]; /** **************************************************** * ##: Flatten Array Once * Flattens array a single level deep (equivalent to lodash _.flatten) * * Notes: * Example: flattenOnce([1, [2, [3, [4]], 5]]) => [1, 2, [3, [4]], 5] * @param {Array} array - Array to flatten * @returns {Array} Flattened array (1 level) * History: * 21-08-2025: Created ****************************************************/ declare function flattenOnce<T>(array: ReadonlyArray<T | ReadonlyArray<T>>): T[]; /****************************************************** * ##: Flatten Array to Depth * Flattens array up to the specified depth (friendly wrapper, default 1) * * Notes: * Example: flattenDepth([1, [2, [3, [4]], 5]], 2) => [1, 2, 3, [4], 5] * @param {Array} array - Array to flatten * @param {Number} depth - Maximum depth * @param {Object} options - Options: predicate, isStrict * @returns {Array} Flattened array up to depth * History: * 21-08-2025: Created ****************************************************/ declare function flattenDepth<T = unknown>(array: readonly unknown[], depth?: number, options?: { predicate?: (v: unknown) => boolean; isStrict?: boolean; }): T[]; /**************************************************** * ##: Boolean Parser * Converts a value to boolean, supporting common string/number representations * * Notes: * - Accepts "true", "yes", "1", "false", "no", "0" (case/whitespace-insensitive) * - Returns default value if not recognized or on error * @param {unknown} value - Input value (string | number | boolean | null | undefined) * @param {Boolean} def - Default value if input cannot be parsed (default: false) * History: * 21-08-2025: Created ****************************************************/ declare const toBool: (value: unknown, def?: boolean) => boolean; /** * @deprecated Use `toBool` instead. */ declare const parseToBool: (value: unknown, def?: boolean) => boolean; /** **************************************************** * ##: Object Property Picker * Picks specified properties from an object and returns a new object * @param {Object} obj - Source object * @param {Array} keys - Array of keys to pick * History: * 21-08-2025: Created ****************************************************/ declare function pick<T extends object, K extends keyof T>(obj: T, keys: K[]): Pick<T, K>; /** **************************************************** * ##: Object Property Omitter * Omits specified properties from an object and returns a new object * @param {Object} obj - Source object * @param {Array} keys - Array of keys to omit * History: * 21-08-2025: Created ****************************************************/ declare function omit<T extends object, K extends keyof T>(obj: T, keys: K[]): Omit<T, K>; /** **************************************************** * ##: Object to Clean String * Converts an object or value to a clean string without JSON braces and quotes * * Notes: * Examples: { a: 1, b: "x" } -> "a=1_b=x", null -> "", 42 -> "42" * @param {unknown} obj - Object or value to convert * History: * 21-08-2025: Created ****************************************************/ declare function objectToString(obj: unknown): string; declare function cleanObject<T = unknown>(obj: T): any; /****************************************************** * ##: Slugify String * Converts a string to a URL-friendly slug (basic ASCII, keeps numbers and dashes) * @param {String} input - String to slugify * History: * 21-08-2025: Created ****************************************************/ declare function slugify(input: string): string; /****************************************************** * ##: Simple String Template Filler * Fills a template string with values (e.g., "Hello, {name}!") * @param {String} template - Template string * @param {Object} values - Key-value pairs to fill * History: * 21-08-2025: Created ****************************************************/ declare function fill(template: string, values: Record<string, string | number>): string; /****************************************************** * ##: Remove Diacritics * Removes diacritic marks from a string using NFD normalization * * Notes: * Examples: "ação" -> "acao", "coração" -> "coracao", "résumé" -> "resume", "naïve" -> "naive" * @param {String} str - String to deburr * History: * 21-08-2025: Created ****************************************************/ declare function deburr(str: string): string; /** * @deprecated Use `deburr` instead. */ declare const removeDiacritics: typeof deburr; /****************************************************** * ##: Basic String Sanitizer * Sanitizes input by removing control chars, HTML/script/style/iframe blocks, dangerous URL schemes, and keeps letters/numbers/spaces/punctuation * * Notes: * Non-string inputs return "". This is a light, generic sanitizer (not a full HTML sanitizer). * @param {unknown} input - Input to sanitize * @param {Number} maxLength - Optional max length for output * History: * 21-08-2025: Created ****************************************************/ declare function sanitize(input: unknown, maxLength?: number): string; /** * @deprecated Use `sanitize` instead. */ declare const basicSanitize: typeof sanitize; /****************************************************** * ##: Clamp Number * Restricts a number to be within the min and max bounds * @param {Number} n - Number to clamp * @param {Number} min - Minimum value * @param {Number} max - Maximum value * History: * 21-08-2025: Created ****************************************************/ declare const clamp: (n: number, min: number, max: number) => number; /****************************************************** * ##: Fixed Decimal Rounding * Rounds a number to a fixed number of decimals without floating point surprises * @param {Number} n - Number to round * @param {Number} decimals - Number of decimal places * History: * 21-08-2025: Created ****************************************************/ declare function round(n: number, decimals?: number): number; /****************************************************** * ##: Safe Integer Conversion * Safely converts a value to an integer. Returns defaultValue if parsing fails or results in NaN. * * Notes: * Examples: toInteger("42") -> 42, toInteger("abc", 10) -> 10, toInteger(undefined) -> 0, toInteger(3.9) -> 3 * @param {unknown} value - Value to convert * @param {Number} defaultValue - Default value if parsing fails * History: * 21-08-2025: Created ****************************************************/ declare function toInteger(value: unknown, defaultValue?: number): number; /****************************************************** * ##: Safe Parse Int (Alias) * Alias for safe integer conversion (for discoverability/backward naming) * @param {unknown} value - Value to convert * @param {Number} defaultValue - Default value if parsing fails * History: * 21-08-2025: Created ****************************************************/ declare const safeParseInt: typeof toInteger; /****************************************************** * ##: Safe Number Conversion * Safely parses a value into a number with optional decimal precision * * Notes: * Handles commas as decimal/thousands separators. Returns 0 for null/undefined/empty string or invalid parsing. * Examples: toNumber("123.45") -> 123.45, toNumber("123,45") -> 123.45, toNumber("1,234.56") -> 1234.56, toNumber("abc", 2) -> 0, toNumber(42) -> 42 * @param {unknown} value - Value to convert * @param {Number} decimals - Number of decimal places * History: * 21-08-2025: Created ****************************************************/ declare function toNumber(value: unknown, decimals?: number): number; /** * @deprecated Use `toNumber` instead. */ declare const parseToNumber: typeof toNumber; /****************************************************** * ##: Random Digits Generator * Generates a random string of digits with secure randomness when available * * Notes: * Options: length (default 6), charset (default "0123456789"), noLeadingZero (if true, first char not "0"). Returns a string to preserve leading zeros. Uses Web Crypto when possible; otherwise falls back to Math.random(). * @param {Number} length - Number of digits * @param {Object} options - Options: charset, noLeadingZero * History: * 21-08-2025: Created ****************************************************/ declare function randomDigits(length?: number, options?: { charset?: string; noLeadingZero?: boolean; }): string; /** * @deprecated Use `randomDigits` instead. */ declare const otp: typeof randomDigits; /****************************************************** * ##: Debounce Function * Returns a debounced version of a function that delays execution until after wait ms * @param {Function} fn - Function to debounce * @param {Number} wait - Delay in milliseconds * History: * 21-08-2025: Created ****************************************************/ declare function debounce<T extends (...args: any[]) => any>(fn: T, wait?: number): T; /****************************************************** * ##: Throttle Function * Returns a throttled version of a function that only executes once per wait ms * @param {Function} fn - Function to throttle * @param {Number} wait - Delay in milliseconds * History: * 21-08-2025: Created ****************************************************/ declare function throttle<T extends (...args: any[]) => any>(fn: T, wait?: number): T; /****************************************************** * ##: Nil Value Check * Checks if a value is null or undefined (Type Guard) * @param {unknown} value - Value to check * History: * 21-08-2025: Created ****************************************************/ declare const isNil: (value: unknown) => value is null | undefined; /****************************************************** * ##: Nil or Nil Text Check * Checks if value is null/undefined or the text "null"/"undefined" * @param {unknown} value - Value to check * History: * 21-08-2025: Created ****************************************************/ declare const isNilText: (value: unknown) => boolean; /****************************************************** * ##: Nil or Empty String Check * Checks if value is null/undefined or an empty string "" * @param {unknown} value - Value to check * History: * 21-08-2025: Created ****************************************************/ declare const isNilOrEmpty: (value: unknown) => boolean; /****************************************************** * ##: Array Nil or Empty Element Check * Checks if any element in array is nil or empty (""). Returns true if input is not an array. * @param {unknown} array - Array to check * History: * 21-08-2025: Created ****************************************************/ declare const hasNilOrEmpty: (array: unknown) => boolean; /****************************************************** * ##: Nil, Empty, or Zero Length Check * Checks if value is nil, empty string, or has zero length (applies to arrays, strings, typed arrays, buffers) * @param {unknown} value - Value to check * History: * 21-08-2025: Created ****************************************************/ declare const isNilEmptyOrZeroLen: (value: unknown) => boolean; /****************************************************** * ##: Nil or Zero Length Check * Checks if value is nil or has zero length (.length === 0). Does NOT treat "" specially. * @param {unknown} value - Value to check * History: * 21-08-2025: Created ****************************************************/ declare const isNilOrZeroLen: (value: unknown) => boolean; /****************************************************** * ##: Nil or NaN Check * Checks if value is nil OR NaN (coercive, matches global isNaN) * * Notes: * Uses global isNaN for parity with JS behavior (coerces strings). Example: isNaN("foo") === true. * @param {unknown} value - Value to check * History: * 21-08-2025: Created ****************************************************/ declare const isNilOrNaN: (value: unknown) => boolean; /** * @deprecated Use `isNil` instead. */ declare const isNullOrUndefined: (value: unknown) => value is null | undefined; /** * @deprecated Use `isNilText` instead. */ declare const isNullOrUndefinedTextInc: (value: unknown) => boolean; /** * @deprecated Use `isNilOrEmpty` instead. */ declare const isNullUndefinedOrEmpty: (value: unknown) => boolean; /** * @deprecated Use `hasNilOrEmpty` instead. */ declare const isNullOrUndefinedInArray: (array: unknown) => boolean; /** * @deprecated Use `isNilEmptyOrZeroLen` instead. */ declare const isNullOrUndefinedEmptyOrZero: (value: unknown) => boolean; /** * @deprecated Use `isNilOrZeroLen` instead. */ declare const isNullUndefinedOrZero: (value: unknown) => boolean; /** * @deprecated Use `isNilOrNaN` instead. */ declare const isNullOrUndefinedOrNaN: (value: unknown) => boolean; /****************************************************** * ##: Human-Readable Byte Formatter * Formats bytes as human-readable text (e.g., kB, MB, KiB, MiB) * * Notes: * SI (kB, MB, ...) uses 1000; IEC (KiB, MiB, ...) uses 1024. Negative values supported. * @param {Number} bytes - Number of bytes to format * @param {Boolean} si - True for metric (SI, base 1000), false for binary (IEC, base 1024) * @param {Number} dp - Decimal places * History: * 21-08-2025: Created ****************************************************/ declare const formatBytes: (bytes: number, si?: boolean, dp?: number) => string; /** * @deprecated Use `formatBytes` instead. */ declare const humanFileSize: (bytes: number, si?: boolean, dp?: number) => string; /****************************************************** * ##: String Similarity * Returns the similarity between two strings (0..1) * * Notes: * Similarity = (|longer|-levenshtein(longer, shorter)) / |longer| ∈ [0, 1]. Safe for empty strings; if both empty => 1.0 * @param {String} s1 - First string * @param {String} s2 - Second string * History: * 21-08-2025: Created ****************************************************/ declare const stringSimilarity: (s1: string, s2: string) => number; /** * @deprecated Use `stringSimilarity` instead. */ declare const getStringSimilarity: (s1: string, s2: string) => number; /****************************************************** * ##: Thousand Separator Formatter * Adds spaces between thousands in a number (e.g., 1234567 -> "1 234 567") * @param {Number|String} value - Number or string to format * @returns {String} Formatted string with spaces as thousand separators * History: * 21-08-2025: Created ****************************************************/ declare const addThousandsSpace: (value: number | string) => string; /****************************************************** * ##: Delay Function * Creates a promise that resolves after the specified number of milliseconds * @param {Number} ms - Delay in milliseconds (negative values are treated as 0) * @returns {Promise<void>} Promise that resolves after the delay * History: * 25-09-2025: Created ****************************************************/ declare const delay: (ms: number) => Promise<void>; /****************************************************** * ##: Enforced Nil/Empty/Textual Null Check * Checks if value is null/undefined/empty string or the text values "null" / "undefined" (case-insensitive) * @param {unknown} value - Value to check * @returns {Boolean} true if value is considered empty-like * History: * 25-09-2025: Created ****************************************************/ declare const isNilTextOrEmpty: (value: unknown) => boolean; /****************************************************** * ##: Modern Currency Formatter (Intl.NumberFormat) * Formats currency values using modern Intl.NumberFormat API with configurable locale and currency. * * Provides flexible currency formatting with optional symbol display, * proper decimal handling, and graceful fallback for errors. * @param {number|string|null|undefined} value Currency value to format * @param {boolean} withoutCurrencySymbol Hide currency symbol (show as decimal) * @param {string} currency Currency code (ISO 4217, e.g., "EUR", "USD") * @param {string} locale Locale string (e.g., "pt-PT", "en-US") * @returns {string} Formatted currency string (e.g., "1.234,56 €" or "1.234,56") * History: * 25-09-2025: Created ****************************************************/ declare const formatCurrency: (value: number | string | null | undefined, withoutCurrencySymbol?: boolean, currency?: string, locale?: string) => string; /****************************************************** * ##: Parse Name into First and Last Components * Extracts first and last name from a full name string. * * Handles edge cases like single names, empty inputs, and multi-word names. * Returns first word as firstName and last word as lastName. * @param {string|null|undefined} name Full name string to parse * @returns {{firstName: string, lastName: string}} Object with firstName and lastName properties * History: * 25-09-2025: Created ****************************************************/ declare const parseName: (name: string | null | undefined) => { firstName: string; lastName: string; }; /****************************************************** * ##: Currency Symbol to ISO Code Converter * Converts currency symbols (€, £, $) to ISO 4217 currency codes. * * Maps common currency symbols to their corresponding three-letter codes. * Returns "EUR" as fallback for unknown symbols. * @param {string|null|undefined} symbol Currency symbol to convert (e.g., "€", "£", "$") * @returns {string} ISO 4217 currency code (e.g., "EUR", "GBP", "USD") * History: * 25-09-2025: Created ****************************************************/ declare const symbolToCurrency: (symbol: string | null | undefined) => string; /****************************************************** * ##: ISO Currency Code to Symbol Converter * Converts ISO 4217 currency codes to their corresponding symbols. * * Maps three-letter currency codes to common currency symbols. * Returns "€" as fallback for unknown currencies. * @param {string|null|undefined} currency ISO 4217 currency code (e.g., "EUR", "GBP", "USD") * @returns {string} Currency symbol (e.g., "€", "£", "$") * History: * 25-09-2025: Created ****************************************************/ declare const currencyToSymbol: (currency: string | null | undefined) => string; /** * @deprecated Use `isNilTextOrEmpty` instead. */ declare const isNullUndefinedOrEmptyEnforced: (value: unknown) => boolean; /** * @deprecated Use `addThousandsSpace` instead. */ declare const addSpaceBetweenNumbers: (value: number | string) => string; /****************************************************** * ##: Portuguese Tax ID (NIF) Validator * Validates a Portuguese tax identification number ("NIF"). * * Rules / Notes: * - Exactly 9 digits. * - Check digit (last digit) via Mod11 weights 9..2 over first 8 digits. * sum = Σ(d[i]*w[i]); mod = sum % 11; check = (mod < 2 ? 0 : 11 - mod). * - Allowed leading digits: 1,2,3,5,6,8,9. * - Strips non-digit characters. * - Rejects repeated digit sequences (e.g., 000000000). * @param value Raw input to validate (string or number) * @returns true if valid, otherwise false. * History: * 25-09-2025: Created as isValidPTTaxId ****************************************************/ declare function isPTTaxId(value: string | number): boolean; /** * @deprecated Use isPTTaxId instead. */ declare const isValidPTTaxId: typeof isPTTaxId; /****************************************************** * ##: IBAN (International Bank Account Number) Validator * Validates International Bank Account Numbers according to ISO 13616. * * Rules / Notes: * - Country-specific format and length validation * - MOD-97 checksum validation * - BBAN (Basic Bank Account Number) format validation * - Supports all IBAN registry countries * - Strips spaces and formatting automatically * @param value Raw IBAN input to validate (string) * @returns true if valid IBAN, otherwise false. * History: * 25-09-2025: Adapted from ibantools library for SalesPark toolkit ****************************************************/ declare function isValidIBAN(value: string): boolean; /****************************************************** * ##: Markdown Security Checker * Analyzes markdown text for potential security risks and XSS vulnerabilities. * * Detects dangerous HTML tags, JavaScript injection attempts, suspicious protocols, * and other security threats. Provides sanitized output with detailed risk assessment. * @param {string|null|undefined} markdownText Markdown content to analyze * @returns {{isValid: boolean, text: string, risks: Array}} Security analysis result * History: * 25-09-2025: Created ****************************************************/ interface SecurityRisk { type: string; description: string; severity?: 'low' | 'medium' | 'high' | 'critical'; } interface SecurityCheckResult { isValid: boolean; text: string; risks: SecurityRisk[]; sanitized: boolean; } declare const checkMarkdownSecurity: (markdownText: string | null | undefined) => SecurityCheckResult; /****************************************************** * ##: HTML/Markdown Sanitizer * Removes potentially dangerous HTML elements and attributes from text. * * More aggressive sanitization for when security is paramount. * Strips all HTML tags and suspicious content. * @param {string|null|undefined} text Text to sanitize * @returns {string} Sanitized text with dangerous content removed * History: * 25-09-2025: Created ****************************************************/ declare const sanitizeMarkdown: (text: string | null | undefined) => string; /****************************************************** * ##: Security Risk Assessment * Provides a security risk score and recommendations based on detected risks. * * Calculates risk score and provides actionable security recommendations. * @param {SecurityRisk[]} risks Array of detected security risks * @returns {{score: number, level: string, recommendations: string[]}} Risk assessment * History: * 25-09-2025: Created ****************************************************/ declare const assessSecurityRisks: (risks: SecurityRisk[]) => { score: number; level: "safe" | "low" | "medium" | "high" | "critical"; recommendations: string[]; }; /** Environment helpers (runtime-agnostic checks) */ declare const isBrowser: boolean; declare const isNode: boolean; export { type SecurityCheckResult, type SecurityRisk, addSpaceBetweenNumbers, addThousandsSpace, areArraysDeepEqualUnordered, areArraysEqual, assessSecurityRisks, basicSanitize, checkMarkdownSecurity, chunk, clamp, cleanObject, compact, currencyToSymbol, debounce, deburr, delay, difference, fill, flatten, flattenDepth, flattenDepthBase, flattenOnce, formatBytes, formatCurrency, getStringSimilarity, groupBy, hasNilOrEmpty, humanFileSize, intersection, isBrowser, isFlattenable, isNil, isNilEmptyOrZeroLen, isNilOrEmpty, isNilOrNaN, isNilOrZeroLen, isNilText, isNilTextOrEmpty, isNode, isNullOrUndefined, isNullOrUndefinedEmptyOrZero, isNullOrUndefinedInArray, isNullOrUndefinedOrNaN, isNullOrUndefinedTextInc, isNullUndefinedOrEmpty, isNullUndefinedOrEmptyEnforced, isNullUndefinedOrZero, isPTTaxId, isValidIBAN, isValidPTTaxId, objectToString, omit, otp, parseName, parseToBool, parseToNumber, pick, pluck, pushAll, randomDigits, removeDiacritics, round, safeParseInt, sanitize, sanitizeMarkdown, shuffle, slugify, sortBy, stringSimilarity, symbolToCurrency, throttle, toBool, toInteger, toNumber, uniq, uniqBy };