forked from shmuelie/Humanizer.Js
-
Notifications
You must be signed in to change notification settings - Fork 0
/
README.html
42 lines (34 loc) · 1.92 KB
/
README.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
<h1>Humanizer.Js</h1>
<p>Humanizer meets all your JavaScript needs for manipulating and displaying
strings, dates, times, numbers and quantities. This is a port of the popular
<a href="https://github.com/MehdiK/Humanizer">Humanizer</a> library to JavaScript. For the
most part you can just follow the documentation for Humanizer with little to no
issue. See below for big differences.</p>
<h2>Differences From Humanizer</h2>
<ol>
<li>Name casing has been changed for JavaScript so all functions and properties
start with lower case now, so instead of
<code>"Sentence casing".Transform(To.LowerCase)</code> you use
<code>"Sentence casing".transform(Humanizer.To.LowerCase)</code>.</li>
<li><p>There isn't a TimeSpan equivalent in JavaScript so all action from or to
TimeSpans now use Numbers in milliseconds instead. So instead of
<code>TimeSpan.FromDays(16).Humanize()</code> you use <code>(16).days().time()</code>. Both will
return "2 weeks".</p>
<p>Also to deal with the lack of TimeSpan extra to* methods have been added
to Numbers to make conversions simpler.</p></li>
<li>I am sadly behind the changes to Humanizer so at times what I have will be
the old way of doing something so you might have to look at older version of
the documentation to understand things.</li>
</ol>
<h2>Road Map</h2>
<p>I have two primary tasks currently with Humanizer.Js</p>
<ol>
<li>Implement features not implemented that are in Humanizer.</li>
<li>Update Implemented features to match updates to Humanizer.</li>
</ol>
<p>Currently it's just me working on this while I wait for code to compile at work.
As such I'm only going so fast. I'm currently focusing on number 2 so that the
documentation from Humanizer can be used. To save myself time I currently am
only implementing default and/or English for code that is localisable. The
ablity to add other languages is there, but for the sake of getting more of the
API done I'm only doing this.</p>