Have ideas to improve npm?Join in the discussion! »

    ord

    1.0.1 • Public • Published
     _______  _______  ______  
    (  ___  )(  ____ )(  __  \ 
    | (   ) || (    )|| (  \  )
    | |   | || (____)|| |   ) |
    | |   | ||     __)| |   | |
    | |   | || (\ (   | |   ) |
    | (___) || ) \ \__| (__/  )
    (_______)|/   \__/(______/ 
                               
    

    Build Status

    Gives you the 'st', 'nd', 'rd' or 'th' of a whole number.

    Does not give you anything for zero, negative numbers, NaN, Infinity or real numbers (e.g. 3.14).

    Does not give you anything for something which isn't a number.

    Synopsis

    var a = 21;
    console.log('Happy ' + a + ord(a));
    

    Will print out 'Happy 21st'.

    Author

    $ npx chilts
    
       ╒════════════════════════════════════════════════════╕
       │                                                    │
       │   Andrew Chilton (Personal)                        │
       │   -------------------------                        │
       │                                                    │
       │          Email : andychilton@gmail.com             │
       │            Web : https://chilts.org                │
       │        Twitter : https://twitter.com/andychilton   │
       │         GitHub : https://github.com/chilts         │
       │         GitLab : https://gitlab.org/chilts         │
       │                                                    │
       │   Apps Attic Ltd (My Company)                      │
       │   ---------------------------                      │
       │                                                    │
       │          Email : chilts@appsattic.com              │
       │            Web : https://appsattic.com             │
       │        Twitter : https://twitter.com/AppsAttic     │
       │         GitLab : https://gitlab.com/appsattic      │
       │                                                    │
       │   Node.js / npm                                    │
       │   -------------                                    │
       │                                                    │
       │        Profile : https://www.npmjs.com/~chilts     │
       │           Card : $ npx chilts                      │
       │                                                    │
       ╘════════════════════════════════════════════════════╛
    

    License

    Copyright 2013-2019 Andrew Chilton. All rights reserved.

    (Ends)

    Install

    npm i ord

    DownloadsWeekly Downloads

    57

    Version

    1.0.1

    License

    none

    Unpacked Size

    8.66 kB

    Total Files

    6

    Last publish

    Collaborators

    • avatar