convnum
    Preparing search index...

    Variable toAstroSignConst

    toAstroSign: (num: number, circular?: boolean) => string = ...

    Converts a number to an astrological sign word

    Type declaration

      • (num: number, circular?: boolean): string
      • Parameters

        • num: number

          The number to convert (must be between 1 and 12)

        • circular: boolean = false

          Whether to use circular indexing (default: false)

        Returns string

        The astrological sign word

    Error if input is out of valid range

    toAstroSign(1) // 'Aries'
    toAstroSign(12) // 'Pisces'
    toAstroSign(13) // Error: Input must be between 1 and 12
    toAstroSign(13, true) // 'Aries'
    toAstroSign(0) // Error: Input must be between 1 and 12
    toAstroSign(1.5) // Error: Input must be an integer
    toAstroSign('Aries') // Error: Input must be a number