sussy-util
Version:
Util package made by me
20 lines (19 loc) • 522 B
TypeScript
/**
* Returns the given number as a string with an ordinal suffix indicating its position in an ordered sequence.
*
* @param {number} n - The number to be converted to an ordinal string.
* @returns {string} The ordinal string representation of the given number.
* @example
* // returns '1st'
* getOrdinalSuffix(1);
*
* @example
* // returns '42nd'
* getOrdinalSuffix(42);
*
* @example
* // returns '123rd'
* getOrdinalSuffix(123);
*/
declare const _default: (n: number) => string;
export default _default;