UNPKG

@instawork/design-system

Version:

The design system for Instawork's web apps

15 lines (14 loc) 762 B
export declare function isArrayLike(obj: unknown): obj is ArrayLike<any>; /** * Returns `false` if the object has a length or value equal to +/-1; otherwise, `true` * @param obj - A numeric value, array, or other object with a "length" property */ export declare function isPlural(obj: unknown): boolean; /** * Returns the value passed for `plural` if the `obj` is plural according to {@link isPlural}; otherwise, returns the * value passed for `singular`. * @param obj - A numeric value, array, or other object with a "length" property * @param singular - The string to return if `obj` is not plural * @param plural - The string to return if `obj` is plural */ export declare function pluralize(obj: unknown, singular: string, plural: string): string;