{"_id":"nth","_rev":"11-281e2f0f462e06a0c6433add2e7ba2b0","name":"nth","description":"The nth package simply takes a number and returns the same number with the appropriate placing string. For example the number 1 becomes 1st, and the number 2 becomes 2nd.","dist-tags":{"latest":"1.1.0"},"versions":{"0.1.1":{"name":"nth","version":"0.1.1","description":"The nth package simply takes a number and returns the same number with the appropriate placing string. For example the number 1 becomes 1st, and the number 2 becomes 2nd.","main":"index.js","scripts":{"test":"grunt test"},"repository":{"type":"git","url":"https://github.com/mitchdenny/nth.git"},"author":{"name":"Mitch Denny","email":"mitch@mitchdenny.com","url":"http://mitchdenny.com/"},"license":"Apache-2.0","bugs":{"url":"https://github.com/mitchdenny/nth"},"homepage":"https://github.com/mitchdenny/nth","dependencies":{"validator":"^3.19.0"},"devDependencies":{"chai":"^1.9.1","grunt":"^0.4.5","grunt-cli":"^0.1.13","grunt-jsdoc":"^0.5.7","grunt-mocha-test":"^0.12.0","grunt-release":"^0.7.0","mocha":"^1.21.4"},"gitHead":"92feca7738902ba0d9da9068cb855f912c950b84","_id":"nth@0.1.1","_shasum":"a32b0c6fbbaab52e99c5ef662eaffea10d421a42","_from":".","_npmVersion":"1.4.28","_npmUser":{"name":"mitchdenny","email":"mitch@mitchdenny.com"},"maintainers":[{"name":"mitchdenny","email":"mitch@mitchdenny.com"}],"dist":{"shasum":"a32b0c6fbbaab52e99c5ef662eaffea10d421a42","tarball":"https://registry.npmjs.org/nth/-/nth-0.1.1.tgz","integrity":"sha512-mLuD652gxQjxn5vZUsOJ4HEixJJPLkLbkRyqNdU+DOgg4D6MMYd1AGkDlUIbSjO7zYoMCGpNtU+Zgz5c6fImWQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICvL5V35olJqYVEvOaZc5yFJ/5Bu0Vz+68rUYRnGOqLUAiBVTWO7fawfstnILde0ZiaYw2CVevG8E9Uy3xhWzMmDPQ=="}]},"directories":{}},"0.1.2":{"name":"nth","version":"0.1.2","description":"The nth package simply takes a number and returns the same number with the appropriate placing string. For example the number 1 becomes 1st, and the number 2 becomes 2nd.","main":"index.js","scripts":{"test":"grunt test"},"repository":{"type":"git","url":"https://github.com/mitchdenny/nth.git"},"author":{"name":"Mitch Denny","email":"mitch@mitchdenny.com","url":"http://mitchdenny.com/"},"license":"Apache-2.0","bugs":{"url":"https://github.com/mitchdenny/nth"},"homepage":"https://github.com/mitchdenny/nth","dependencies":{"validator":"^3.19.0"},"devDependencies":{"chai":"^1.9.1","grunt":"^0.4.5","grunt-cli":"^0.1.13","grunt-jsdoc":"^0.5.7","grunt-mocha-test":"^0.12.0","grunt-release":"^0.7.0","mocha":"^1.21.4"},"gitHead":"f265b1bbb074f949763578e9b2ac230451901b15","_id":"nth@0.1.2","_shasum":"330c0d1d00f79b562d12ddd7b0cae8e2dd0f8eb6","_from":".","_npmVersion":"1.4.28","_npmUser":{"name":"mitchdenny","email":"mitch@mitchdenny.com"},"maintainers":[{"name":"mitchdenny","email":"mitch@mitchdenny.com"}],"dist":{"shasum":"330c0d1d00f79b562d12ddd7b0cae8e2dd0f8eb6","tarball":"https://registry.npmjs.org/nth/-/nth-0.1.2.tgz","integrity":"sha512-Mttsbc/WvhGU38tYFRMnDYfz6V08atP2qbkE2Ta0fu7phtL3eHITDS79blYyjY3ey8waZGj2p5gq/0rUIwhMxw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBNz89oxOYSYAkT4aGwPobQCv0uzAi6KSpnJb3ukbZjuAiEAhDhLhB/CmEtlH4M751ncL8IyVsIgXgqZ5i+tX5i8cJg="}]},"directories":{}},"0.1.3":{"name":"nth","version":"0.1.3","description":"The nth package simply takes a number and returns the same number with the appropriate placing string. For example the number 1 becomes 1st, and the number 2 becomes 2nd.","main":"index.js","scripts":{"test":"grunt test"},"repository":{"type":"git","url":"git+https://github.com/mitchdenny/nth.git"},"author":{"name":"Mitch Denny","email":"mitch@mitchdenny.com","url":"http://mitchdenny.com/"},"license":"Apache-2.0","bugs":{"url":"https://github.com/mitchdenny/nth"},"homepage":"https://github.com/mitchdenny/nth","dependencies":{"validator":"^3.19.0"},"devDependencies":{"chai":"^1.9.1","grunt":"^0.4.5","grunt-cli":"^0.1.13","grunt-jsdoc":"^0.5.7","grunt-mocha-test":"^0.12.0","grunt-release":"^0.7.0","mocha":"^1.21.4"},"gitHead":"09004d910514ed5cbf6d59f52792a576c9fcd5ea","_id":"nth@0.1.3","_shasum":"9d16498fbc9ca24281b84d3de37755c68540aece","_from":".","_npmVersion":"3.5.2","_nodeVersion":"5.1.0","_npmUser":{"name":"mitchdenny","email":"mitch@mitchdenny.com"},"dist":{"shasum":"9d16498fbc9ca24281b84d3de37755c68540aece","tarball":"https://registry.npmjs.org/nth/-/nth-0.1.3.tgz","integrity":"sha512-tWatdC3ZlPSuhayibe2N4a+h/33BmkOt+VOzFDn5zsyMm8vfaghISnXysD0qXqbX2TThW3WS3QSW/tuxa8th0Q==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHoP2AV4topF8cIMzB1t61Y0+Ro0mdctXlFjlPA1KsdUAiEArTkpOnrAwf9T/SyaLSNqNC9QlhF/W05fVyLbiBjUYyA="}]},"maintainers":[{"name":"mitchdenny","email":"mitch@mitchdenny.com"}],"directories":{}},"1.0.0":{"name":"nth","version":"1.0.0","description":"The nth package simply takes a number and returns the same number with the appropriate placing string. For example the number 1 becomes 1st, and the number 2 becomes 2nd.","main":"index.js","scripts":{"test":"mocha"},"repository":{"type":"git","url":"git+https://github.com/mitchdenny/nth.git"},"author":{"name":"Mitch Denny","email":"mitch@mitchdenny.com","url":"http://mitchdenny.com/"},"license":"Apache-2.0","bugs":{"url":"https://github.com/mitchdenny/nth"},"homepage":"https://github.com/mitchdenny/nth","dependencies":{},"devDependencies":{"chai":"^4.2.0","mocha":"^6.0.2"},"_id":"nth@1.0.0","_nodeVersion":"10.15.3","_npmVersion":"6.8.0","dist":{"integrity":"sha512-vdLlhCjnUF7UBBIp1ie6i4i5C1L7F/61lA5kFiiUxG719x86J2Yx3arda3GRtQPpfRUNMCBlZOxoAu06Rw+NzA==","shasum":"8a2322fdb4b3a8eaae72516c6f37caf4c17e850c","tarball":"https://registry.npmjs.org/nth/-/nth-1.0.0.tgz","fileCount":4,"unpackedSize":13578,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcp7GxCRA9TVsSAnZWagAAGB8P/1efmDxJNlikU0ZiRrgw\nsbCQDoGG/7gBmyhefHYMBQpxJIBYEV4y1FRQdHxOl1QXJXb9s//pw4+7TEs5\njyViCQeEM9TcApEampR9NCwmdcjl5DaKlVYAMzdof1uESQs924wLC8obTp2Q\n/NqUp8lxA9hBJtGI/u9bQen3FZkedoH4th7y9KwpoZICXJxROwZSjlPQJaQb\ncBFsScEKN0+o/E7FLOEy7vjvelB6RbA8PYx3I6AGw9AWcW7FdGui0kutqZJ+\nbBEjZ7xuGkpHHCyceJEjJHAHrIdaNil2aLg1mAhZniulG7WsU7o2bDsj3BWR\nY6YUjUq05RxQAVZh1tY4uDBfZZlpAPAhmwd3mgTiABCPhB3Rsq1qZQokaDgT\n7pHZigtAlD9suIraWPWFLAUdB/pN83cRiR5iey++0ReoBKhA1+Dk73xQ/Naa\nlLGnTmm6urp1xxppolXVyfSroJjDUsTEEvRVeI2+WwMENulGXCEPpNaRKxAs\nyxNARJK7oufG9hvD5eEnIOwrNEzpdqswUUdivX+gTbe7Udd1AiVnBqqPgY34\nUO4ZndfNOqPYl94xNcjhpqIdLq72RpAc8MHzzkWe9livFaNcHdv5kufcxe1G\n0p/ZUUswjTK7IUos7jXTb4eMkNXYHgrx7GNejoLGrZOr+OJcqrT7Kiyo9T6M\nDMFw\r\n=dH8G\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDW2RHhbgevF27yCx6oHxmW8LZh/aDsR5fMcY3ABYZwugIhANOF2ibtbncmtFr/m2w68xgedj4CrGUT5shXPa9Fvnj6"}]},"maintainers":[{"name":"mitchdenny","email":"mitch@mitchdenny.com"}],"_npmUser":{"name":"nth-publisher","email":"nth@mitchdenny.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/nth_1.0.0_1554493872381_0.44744261454967993"},"_hasShrinkwrap":false},"1.1.0-beta.1":{"name":"nth","version":"1.1.0-beta.1","description":"The nth package simply takes a number and returns the same number with the appropriate placing string. For example the number 1 becomes 1st, and the number 2 becomes 2nd.","main":"index.js","scripts":{"test":"mocha"},"repository":{"type":"git","url":"git+https://github.com/mitchdenny/nth.git"},"author":{"name":"Mitch Denny","email":"mitch@mitchdenny.com","url":"http://mitchdenny.com/"},"license":"Apache-2.0","bugs":{"url":"https://github.com/mitchdenny/nth"},"homepage":"https://github.com/mitchdenny/nth","dependencies":{},"devDependencies":{"chai":"^4.2.0","mocha":"^7.0.0"},"gitHead":"8ce934bbf1891fe97139340b37537fc06c3abfc6","_id":"nth@1.1.0-beta.1","_nodeVersion":"12.14.0","_npmVersion":"6.13.4","dist":{"integrity":"sha512-8hMUQIXKjAxowbc6AL/glyCNJYWMGwr/8JZTy9WHxFwKRHWMbplizlyyJ1FQdQX195cNL4Zz43SlEfD9cbi4Kw==","shasum":"3496f4fdda09ebdc3d7aa21e08e32ad2b3c7eb8d","tarball":"https://registry.npmjs.org/nth/-/nth-1.1.0-beta.1.tgz","fileCount":4,"unpackedSize":14114,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeEnpdCRA9TVsSAnZWagAAxoAP/1CP+3ht4CEuj4TazTOQ\n97kA3+CepZrSy2oh7QBF4a7GDaJIvq8MFkQuZEY+jm2beTKF9urrX8LQidzk\nudr+mPyNHYyNvXS8g64nnuSeGNm+ECmhhh5cJ/4MOcvTU7ewiAIUfZOhLsHp\nsz5a6mDgWy+ElrluKdA6bIuPvsYBVfByoYMaWzldCd8Ek2rhZSo/lz+NeaR0\nO9FrbEd8oMpwZvX7axfZgJpp6X1igLswR72PbtiRM0CvL/s7Y6nVuR04Vka1\nrRD9hux/wqZOJFxRNmt10grKU7+77hi7YBrejttlNH7DOpLiFfFk/e7SbTQI\n8ov71KC/Y1UAnZVRHOdML4nrwTIIV+0YgxB+IWMyQ+fINMS2ejRLhkuHmzNa\nXQx1uhBpxBTy01pHEWxIKs3oKEZsO0cr6IvdnP9MV5P4gFKplUwUVnhThts0\nC9ByyXpZgwXj1YuTleUV8iBYDaloQ2ZU0+WPH6JSjvzo2vjQwk79aPVyNv49\nJQVunzj/PzCkGAAKu5z7QzRwaZbH6HC9YilbEc3ZYGFlnUWxN4pB3kZXrRb/\nL7z9jcBM+uNY/I0ZU3Wn548JX2+tcXqaVG81yaCmJzD0Pl8v4u8p4aAA1iIP\n8MC4U0xotoxp3qHFJd1qcYfFUm3gaADyRLoU3SIXO5vI3nzzsKh/c+K7dKdP\n421w\r\n=M4nR\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDT5n5CKVnrb6GD8sN9HKUeYyBCkoRzFw0Z8UkTvLrBwgIgV8uQGLzUnxRDNpnCO2mkMNVkm766lQPNj2a7ZpdcAx8="}]},"maintainers":[{"name":"mitchdenny","email":"mitch@mitchdenny.com"}],"_npmUser":{"name":"nth-publisher","email":"nth@mitchdenny.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/nth_1.1.0-beta.1_1578269276774_0.3892667371063947"},"_hasShrinkwrap":false},"1.1.0":{"name":"nth","version":"1.1.0","description":"The nth package simply takes a number and returns the same number with the appropriate placing string. For example the number 1 becomes 1st, and the number 2 becomes 2nd.","main":"index.js","scripts":{"test":"mocha"},"repository":{"type":"git","url":"git+https://github.com/mitchdenny/nth.git"},"author":{"name":"Mitch Denny","email":"mitch@mitchdenny.com","url":"http://mitchdenny.com/"},"license":"Apache-2.0","bugs":{"url":"https://github.com/mitchdenny/nth"},"homepage":"https://github.com/mitchdenny/nth","dependencies":{},"devDependencies":{"chai":"^4.2.0","mocha":"^7.0.0"},"gitHead":"d8bba4e121596aa8d7195e20b5170c028d18502f","_id":"nth@1.1.0","_nodeVersion":"12.14.0","_npmVersion":"6.13.4","dist":{"integrity":"sha512-EEczU0qXGFXD+LrFat47UlUbdrdkOEsxeiR4tTc9jhnPzdZEfs7DCAmJsiFjARfvlYWnfA4Ub4uJ3Uyj1i2R9g==","shasum":"ed2a48e7c0f72f3f70e1047407829726317267c5","tarball":"https://registry.npmjs.org/nth/-/nth-1.1.0.tgz","fileCount":4,"unpackedSize":14107,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeEn0hCRA9TVsSAnZWagAA+KgP/1O/a5uT072fuW+KRBcI\npI6hTNwHvU20xuWHxJmVci0yWXp2LVPirTr89MARnSKN/rw9VSzPTsgdRKQL\ne1l4oHECvkremU19TZlUjDBsOCb/WKWcya9+sQg4WIoUr8+HIMrpVO1Sp4K0\neCrEL10h+69a/l3zCBRULB1hIXpwJmpSGGy0AkEoblE8SJBawAX9xmVQyv4i\nbmHqthtSpyQfgJEuLsDRisXMKG7jiipbZ+7cABdlAgtK64hQLYFQih3unKH+\nQqe5IGhhg2oPmAOGIZ3QeTAhPW+34k+DgcWBHQG/cLAnTrR/Q3dCZ41yiDrT\nbp8x/OiPkRBBGOe28KGzktK2t5hSHVFbPIp7OB4MDjN6ZAz9VMuTKxxyLZw+\ngtGW4k814l2teatUJh6y01x/rjK3SqpT5nMR0mtmPFIZ6BIx3bxm/XsWCmvW\n6YaT56NbtzA12ujSswwZMBMY62lQvkn6pwmAi2kJsTlTNJSmjKWtBXlHI6OY\n7pJssWb5MK6RQmhv86DnbuzzcsKnGkzgzYPU8Gn0oHWP+QxubNErVIDS9G3e\nNX8YaSIYnTA7NHkhN3jlHBf7NH0RCELgy+0rQZsfTutl2JqVZMkXLBCnuJLp\nrKS2OijqPkKWwZDMnFv1rCjScJWxd6jQvppttA4rPC2FV5ggtPwCO4eLemcf\nXYWA\r\n=UWTc\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICu/W3iL/GNfI/aMX9bXnyJTlaQ02oI/LQCzDITCBTNEAiB69WwMJ+fhT2LqWx5BFCELxosfpitn29G8/VVWJSZ/Kg=="}]},"maintainers":[{"name":"mitchdenny","email":"mitch@mitchdenny.com"}],"_npmUser":{"name":"nth-publisher","email":"nth@mitchdenny.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/nth_1.1.0_1578269984787_0.9112968036895777"},"_hasShrinkwrap":false}},"readme":"nth\r\n===\r\n\r\nThe 'nth' package contains a dirt simple module that takes an integer and then appends the appropriate place suffix. For example:\r\n\r\n- 1 becomes 1st\r\n- 2 becomes 2nd\r\n- 3 becomes 3rd\r\n- 4 becomes 4th\r\n- 13 becomes 13th\r\n- 23 becomes 23rd\r\n\r\nUsage\r\n-----\r\n\r\nUsing the package is very easy. Just download it and install it via NPM:\r\n\r\n```bash\r\nnpm install nth --save\r\n```\r\n\r\nOnce the package is downloaded and installed, you just need to require in the module and call the `appendSuffix` method:\r\n\r\n```js\r\nvar nth = require('nth');\r\nvar output = nth.appendSuffix(23);\r\nconsole.log(output); // outputs: '23rd'\r\n```\r\n\r\nIf you just want to get the suffix itself (without the number) then you can call the `getSuffix` method.\r\n\r\n```js\r\nvar nth = require('nth');\r\nvar output = nth.getSuffix(23);\r\nconsole.log(output); // outputs: 'rd'\r\n```\r\n\r\nContributions\r\n-------------\r\n\r\nIf you find a bug feel free to submit a pull request.\r\n\r\nKnown Limitations\r\n-----------------\r\n\r\nBeyond the few obvious test cases I haven't spend any time on more complex scenarios like dealing with exponents. I can't imagine many folks really using this library in that context anyway :)","maintainers":[{"name":"mitchdenny","email":"mitch@mitchdenny.com"}],"time":{"modified":"2022-06-22T12:12:23.757Z","created":"2014-09-25T05:55:33.797Z","0.1.1":"2014-09-25T05:55:33.797Z","0.1.2":"2014-09-25T06:09:43.364Z","0.1.3":"2015-12-28T12:18:03.761Z","1.0.0":"2019-04-05T19:51:12.612Z","1.1.0-beta.1":"2020-01-06T00:07:56.892Z","1.1.0":"2020-01-06T00:19:44.894Z"},"homepage":"https://github.com/mitchdenny/nth","repository":{"type":"git","url":"git+https://github.com/mitchdenny/nth.git"},"author":{"name":"Mitch Denny","email":"mitch@mitchdenny.com","url":"http://mitchdenny.com/"},"bugs":{"url":"https://github.com/mitchdenny/nth"},"license":"Apache-2.0","readmeFilename":"README.md"}