@@ -31,20 +31,20 @@ Humanizer meets all your TypeScript needs for manipulating and displaying string
31
31
Import the Extensions:
32
32
33
33
``` ts
34
- import " https://deno.land/x/humanizer.ts /byteSize.ts"
35
- import " https://deno.land/x/humanizer.ts /vocabularies.ts"
36
- import " https://deno.land/x/humanizer.ts /ordinalize.ts"
37
- import " https://deno.land/x/humanizer.ts /toQuantity.ts"
38
- import " https://deno.land/x/humanizer.ts /numberToNumbers.ts"
39
- import " https://deno.land/x/humanizer.ts /numberToWords.ts"
40
- import " https://deno.land/x/humanizer.ts /romanNumerals.ts"
41
- import " https://deno.land/x/humanizer.ts /metricNumerals.ts"
34
+ import " https://deno.land/x/humanizer/byteSize.ts"
35
+ import " https://deno.land/x/humanizer/vocabularies.ts"
36
+ import " https://deno.land/x/humanizer/ordinalize.ts"
37
+ import " https://deno.land/x/humanizer/toQuantity.ts"
38
+ import " https://deno.land/x/humanizer/numberToNumbers.ts"
39
+ import " https://deno.land/x/humanizer/numberToWords.ts"
40
+ import " https://deno.land/x/humanizer/romanNumerals.ts"
41
+ import " https://deno.land/x/humanizer/metricNumerals.ts"
42
42
```
43
43
44
44
## Examples
45
45
46
46
``` ts
47
- import " https://deno.land/x/humanizer.ts /byteSize.ts"
47
+ import " https://deno.land/x/humanizer/byteSize.ts"
48
48
49
49
let result = (10 ).megabytes ().toString ()
50
50
console .log (result ) // -> 10 MB
@@ -57,7 +57,7 @@ Quite a few changes and additions are made on `ByteSize` to make the interaction
57
57
Here is a few examples of how you can convert from numbers to byte sizes and between size magnitudes:
58
58
59
59
``` ts
60
- import " https://deno.land/x/humanizer.ts /byteSize.ts"
60
+ import " https://deno.land/x/humanizer/byteSize.ts"
61
61
62
62
let fileSize = (10 ).kilobytes ()
63
63
console .log (fileSize .bits ) // -> 81920
@@ -93,7 +93,7 @@ console.log(f.toString()) // -> 5.020549774169922 GB
93
93
` Pluralize ` pluralizes the provided input while taking irregular and uncountable words into consideration:
94
94
95
95
``` ts
96
- import " https://deno.land/x/humanizer.ts /vocabularies.ts"
96
+ import " https://deno.land/x/humanizer/vocabularies.ts"
97
97
98
98
" Man" .pluralize () // -> Men
99
99
" string" .pluralize () // -> "strings"
@@ -112,7 +112,7 @@ import "https://deno.land/x/humanizer.ts/vocabularies.ts"
112
112
## <a id =" ordinalize " >Ordinalize</a >
113
113
114
114
``` ts
115
- import " https://deno.land/x/humanizer.ts /ordinalize.ts"
115
+ import " https://deno.land/x/humanizer/ordinalize.ts"
116
116
117
117
(1 ).ordinalize () => " 1st"
118
118
(5 ).ordinalize () => " 5th"
@@ -121,7 +121,7 @@ import "https://deno.land/x/humanizer.ts/ordinalize.ts"
121
121
## <a id =" toquantity " >ToQuantity</a >
122
122
123
123
``` ts
124
- import " https://deno.land/x/humanizer.ts /toQuantity.ts"
124
+ import " https://deno.land/x/humanizer/toQuantity.ts"
125
125
126
126
" case" .toQuantity (0 ) => " 0 cases"
127
127
" case" .toQuantity (1 ) => " 1 case"
@@ -153,7 +153,7 @@ You can also pass a second argument, `ShowQuantityAs`, to `toQuantity` to specif
153
153
Humanizer provides a fluent API that produces (usually big) numbers in a clearer fashion:
154
154
155
155
``` ts
156
- import " https://deno.land/x/humanizer.ts /numberToNumbers.ts"
156
+ import " https://deno.land/x/humanizer/numberToNumbers.ts"
157
157
158
158
(1.25 ).Billions () => 1250000000
159
159
(3 ).Hundreds ().Thousands () => 300000
@@ -164,7 +164,7 @@ import "https://deno.land/x/humanizer.ts/numberToNumbers.ts"
164
164
Humanizer can change numbers to words using the ` toWords ` extension:
165
165
166
166
``` ts
167
- import " https://deno.land/x/humanizer.ts /numberToWords.ts"
167
+ import " https://deno.land/x/humanizer/numberToWords.ts"
168
168
169
169
(1 ).toWords () => " one"
170
170
(10 ).toWords () => " ten"
@@ -176,7 +176,7 @@ import "https://deno.land/x/humanizer.ts/numberToWords.ts"
176
176
## Number to ordinal words
177
177
178
178
``` ts
179
- import " https://deno.land/x/humanizer.ts /numberToWords.ts"
179
+ import " https://deno.land/x/humanizer/numberToWords.ts"
180
180
181
181
(0 ).toOrdinalWords () => " zeroth"
182
182
(1 ).toOrdinalWords () => " first"
@@ -195,7 +195,7 @@ import "https://deno.land/x/humanizer.ts/numberToWords.ts"
195
195
Humanizer can change numbers to Roman numerals using the ` toRoman ` extension. The numbers 1 to 10 can be expressed in Roman numerals as follows:
196
196
197
197
``` ts
198
- import " https://deno.land/x/humanizer.ts /romanNumerals.ts"
198
+ import " https://deno.land/x/humanizer/romanNumerals.ts"
199
199
200
200
(1 ).toRoman () => " I"
201
201
(2 ).toRoman () => " II"
@@ -224,7 +224,7 @@ Also the reverse operation using the `fromRoman` extension.
224
224
Humanizer can change numbers to Metric numerals using the ` toMetric ` extension. The numbers 1, 1230 and 0.1 can be expressed in Metric numerals as follows:
225
225
226
226
``` ts
227
- import " https://deno.land/x/humanizer.ts /metricNumerals.ts"
227
+ import " https://deno.land/x/humanizer/metricNumerals.ts"
228
228
229
229
(1 ).toMetric () => " 1"
230
230
(1230 ).toMetric () => " 1.23k"
@@ -241,4 +241,4 @@ Also the reverse operation using the `fromMetric` extension.
241
241
242
242
243
243
## License
244
- [ ![ FOSSA Status] ( https://app.fossa.io/api/projects/git%2Bgithub.com%2Ffakoua%2FHumanizer.ts.svg?type=large )] ( https://app.fossa.io/projects/git%2Bgithub.com%2Ffakoua%2FHumanizer.ts?ref=badge_large )
244
+ [ ![ FOSSA Status] ( https://app.fossa.io/api/projects/git%2Bgithub.com%2Ffakoua%2FHumanizer.ts.svg?type=large )] ( https://app.fossa.io/projects/git%2Bgithub.com%2Ffakoua%2FHumanizer.ts?ref=badge_large )
0 commit comments