Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Branch: master
Fetching contributors…

Cannot retrieve contributors at this time

17 lines (12 sloc) 3.22 KB
<!DOCTYPE html> <html> <head> <title></title> <meta http-equiv="content-type" content="text/html; charset=UTF-8"> <link rel="stylesheet" media="all" href="docco.css" /> </head> <body> <div id="container"> <div id="background"></div> <div id="jump_to"> Jump To &hellip; <div id="jump_wrapper"> <div id="jump_page"> <a class="source" href="default_inflections.html"> </a> <a class="source" href="index.html"> </a> <a class="source" href="inflections.html"> </a> <a class="source" href="methods.html"> </a> <a class="source" href="number_extensions.html"> </a> <a class="source" href="string_extensions.html"> </a> </div> </div> </div> <table cellpadding="0" cellspacing="0"> <thead> <tr> <th class="docs"> <h1> </h1> </th> <th class="code"> </th> </tr> </thead> <tbody> <tr id="section-1"> <td class="docs"> <div class="pilwrap"> <a class="pilcrow" href="#section-1">&#182;</a> </div> </td> <td class="code"> <div class="highlight"><pre><span class="nv">inflect = </span><span class="nx">require</span><span class="p">(</span><span class="s">&#39;../inflect&#39;</span><span class="p">)</span>
<span class="nv">enableNumberExtensions = </span><span class="o">-&gt;</span></pre></div> </td> </tr> <tr id="section-2"> <td class="docs"> <div class="pilwrap"> <a class="pilcrow" href="#section-2">&#182;</a> </div> <p>Turns a number into an ordinal string used to denote the position in an
ordered sequence such as 1st, 2nd, 3rd, 4th.</p>
<pre><code>1.ordinalize() # =&gt; "1st"
2.ordinalize() # =&gt; "2nd"
1002.ordinalize() # =&gt; "1002nd"
1003.ordinalize() # =&gt; "1003rd"
</code></pre> </td> <td class="code"> <div class="highlight"><pre> <span class="nb">Number</span><span class="o">::</span><span class="nv">ordinalize = </span><span class="o">-&gt;</span>
<span class="nx">inflect</span><span class="p">.</span><span class="nx">ordinalize</span><span class="p">(</span><span class="k">this</span><span class="p">)</span>
<span class="nv">exports.enableNumberExtensions = </span><span class="nx">enableNumberExtensions</span>
</pre></div> </td> </tr> </tbody> </table> </div> </body> </html>
Jump to Line
Something went wrong with that request. Please try again.