-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
178 lines (176 loc) · 17 KB
/
index.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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
<!DOCTYPE html><html class="default" lang="en"><head><meta charSet="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>@dbdteam/humanizator</title><meta name="description" content="Documentation for @dbdteam/humanizator"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="assets/style.css"/><link rel="stylesheet" href="assets/highlight.css"/><script defer src="assets/main.js"></script><script async src="assets/icons.js" id="tsd-icons-script"></script><script async src="assets/search.js" id="tsd-search-script"></script><script async src="assets/navigation.js" id="tsd-nav-script"></script><style>
@media (prefers-color-scheme: dark) {
:root {
--md-sys-color-primary: #f5be48;
--md-sys-color-on-primary: #402d00;
--md-sys-color-primary-container: #5d4200;
--md-sys-color-on-primary-container: #ffdea3;
--md-sys-color-secondary: #d9c4a0;
--md-sys-color-on-secondary: #3b2f15;
--md-sys-color-secondary-container: #53452a;
--md-sys-color-on-secondary-container: #f6e0bb;
--md-sys-color-tertiary: #b2cfa8;
--md-sys-color-on-tertiary: #1e361b;
--md-sys-color-tertiary-container: #344d2f;
--md-sys-color-on-tertiary-container: #cdebc3;
--md-sys-color-error: #ffb4ab;
--md-sys-color-on-error: #690005;
--md-sys-color-error-container: #93000a;
--md-sys-color-on-error-container: #ffb4ab;
--md-sys-color-background: #1e1b16;
--md-sys-color-on-background: #e9e1d9;
--md-sys-color-surface: #1e1b16;
--md-sys-color-on-surface: #e9e1d9;
--md-sys-color-surface-variant: #4d4639;
--md-sys-color-on-surface-variant: #d1c5b4;
--md-sys-color-outline: #9a8f80;
--md-sys-color-outline-variant: #4d4639;
--md-sys-color-shadow: #000000;
--md-sys-color-scrim: #000000;
--md-sys-color-inverse-surface: #e9e1d9;
--md-sys-color-inverse-on-surface: #34302a;
--md-sys-color-inverse-primary: #7a5900;
--md-sys-color-surface-dim: #16130e;
--md-sys-color-surface-bright: #3d3933;
--md-sys-color-surface-container-lowest: #110e09;
--md-sys-color-surface-container-low: #1e1b16;
--md-sys-color-surface-container: #221f1a;
--md-sys-color-surface-container-high: #2d2924;
--md-sys-color-surface-container-highest: #38342e
}
}
:root[data-theme="dark"] {
--md-sys-color-primary: #f5be48;
--md-sys-color-on-primary: #402d00;
--md-sys-color-primary-container: #5d4200;
--md-sys-color-on-primary-container: #ffdea3;
--md-sys-color-secondary: #d9c4a0;
--md-sys-color-on-secondary: #3b2f15;
--md-sys-color-secondary-container: #53452a;
--md-sys-color-on-secondary-container: #f6e0bb;
--md-sys-color-tertiary: #b2cfa8;
--md-sys-color-on-tertiary: #1e361b;
--md-sys-color-tertiary-container: #344d2f;
--md-sys-color-on-tertiary-container: #cdebc3;
--md-sys-color-error: #ffb4ab;
--md-sys-color-on-error: #690005;
--md-sys-color-error-container: #93000a;
--md-sys-color-on-error-container: #ffb4ab;
--md-sys-color-background: #1e1b16;
--md-sys-color-on-background: #e9e1d9;
--md-sys-color-surface: #1e1b16;
--md-sys-color-on-surface: #e9e1d9;
--md-sys-color-surface-variant: #4d4639;
--md-sys-color-on-surface-variant: #d1c5b4;
--md-sys-color-outline: #9a8f80;
--md-sys-color-outline-variant: #4d4639;
--md-sys-color-shadow: #000000;
--md-sys-color-scrim: #000000;
--md-sys-color-inverse-surface: #e9e1d9;
--md-sys-color-inverse-on-surface: #34302a;
--md-sys-color-inverse-primary: #7a5900;
--md-sys-color-surface-dim: #16130e;
--md-sys-color-surface-bright: #3d3933;
--md-sys-color-surface-container-lowest: #110e09;
--md-sys-color-surface-container-low: #1e1b16;
--md-sys-color-surface-container: #221f1a;
--md-sys-color-surface-container-high: #2d2924;
--md-sys-color-surface-container-highest: #38342e
}
@media (prefers-color-scheme: light) {
:root {
--md-sys-color-primary: #7a5900;
--md-sys-color-on-primary: #ffffff;
--md-sys-color-primary-container: #ffdea3;
--md-sys-color-on-primary-container: #261900;
--md-sys-color-secondary: #6c5c3f;
--md-sys-color-on-secondary: #ffffff;
--md-sys-color-secondary-container: #f6e0bb;
--md-sys-color-on-secondary-container: #251a04;
--md-sys-color-tertiary: #4b6545;
--md-sys-color-on-tertiary: #ffffff;
--md-sys-color-tertiary-container: #cdebc3;
--md-sys-color-on-tertiary-container: #092008;
--md-sys-color-error: #ba1a1a;
--md-sys-color-on-error: #ffffff;
--md-sys-color-error-container: #ffdad6;
--md-sys-color-on-error-container: #410002;
--md-sys-color-background: #fffbff;
--md-sys-color-on-background: #1e1b16;
--md-sys-color-surface: #fffbff;
--md-sys-color-on-surface: #1e1b16;
--md-sys-color-surface-variant: #ede1cf;
--md-sys-color-on-surface-variant: #4d4639;
--md-sys-color-outline: #7f7667;
--md-sys-color-outline-variant: #d1c5b4;
--md-sys-color-shadow: #000000;
--md-sys-color-scrim: #000000;
--md-sys-color-inverse-surface: #34302a;
--md-sys-color-inverse-on-surface: #f8efe7;
--md-sys-color-inverse-primary: #f5be48;
--md-sys-color-surface-dim: #e1d9d0;
--md-sys-color-surface-bright: #fff8f2;
--md-sys-color-surface-container-lowest: #ffffff;
--md-sys-color-surface-container-low: #fbf2e9;
--md-sys-color-surface-container: #f5ede4;
--md-sys-color-surface-container-high: #efe7de;
--md-sys-color-surface-container-highest: #e9e1d9
}
}
:root[data-theme="light"] {
--md-sys-color-primary: #7a5900;
--md-sys-color-on-primary: #ffffff;
--md-sys-color-primary-container: #ffdea3;
--md-sys-color-on-primary-container: #261900;
--md-sys-color-secondary: #6c5c3f;
--md-sys-color-on-secondary: #ffffff;
--md-sys-color-secondary-container: #f6e0bb;
--md-sys-color-on-secondary-container: #251a04;
--md-sys-color-tertiary: #4b6545;
--md-sys-color-on-tertiary: #ffffff;
--md-sys-color-tertiary-container: #cdebc3;
--md-sys-color-on-tertiary-container: #092008;
--md-sys-color-error: #ba1a1a;
--md-sys-color-on-error: #ffffff;
--md-sys-color-error-container: #ffdad6;
--md-sys-color-on-error-container: #410002;
--md-sys-color-background: #fffbff;
--md-sys-color-on-background: #1e1b16;
--md-sys-color-surface: #fffbff;
--md-sys-color-on-surface: #1e1b16;
--md-sys-color-surface-variant: #ede1cf;
--md-sys-color-on-surface-variant: #4d4639;
--md-sys-color-outline: #7f7667;
--md-sys-color-outline-variant: #d1c5b4;
--md-sys-color-shadow: #000000;
--md-sys-color-scrim: #000000;
--md-sys-color-inverse-surface: #34302a;
--md-sys-color-inverse-on-surface: #f8efe7;
--md-sys-color-inverse-primary: #f5be48;
--md-sys-color-surface-dim: #e1d9d0;
--md-sys-color-surface-bright: #fff8f2;
--md-sys-color-surface-container-lowest: #ffffff;
--md-sys-color-surface-container-low: #fbf2e9;
--md-sys-color-surface-container: #f5ede4;
--md-sys-color-surface-container-high: #efe7de;
--md-sys-color-surface-container-highest: #e9e1d9
}
</style><link rel="stylesheet" href="assets/material-style.css"/></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os";document.body.style.display="none";setTimeout(() => app?app.showPage():document.body.style.removeProperty("display"),500)</script><header class="tsd-page-toolbar"><div class="tsd-toolbar-contents container"><div class="table-cell" id="tsd-search" data-base="."><div class="field"><label for="tsd-search-field" class="tsd-widget tsd-toolbar-icon search no-caption"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><use href="assets/icons.svg#icon-search"></use></svg></label><input type="text" id="tsd-search-field" aria-label="Search"/></div><div class="field"><div id="tsd-toolbar-links"></div></div><ul class="results"><li class="state loading">Preparing search index...</li><li class="state failure">The search index is not available</li></ul><a href="index.html" class="title">@dbdteam/humanizator</a></div><div class="table-cell" id="tsd-widgets"><a href="#" class="tsd-widget tsd-toolbar-icon menu no-caption" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><use href="assets/icons.svg#icon-menu"></use></svg></a></div></div></header><div class="container container-main"><div class="col-content"><div class="tsd-page-title"><h2>@dbdteam/humanizator</h2></div><div class="tsd-panel tsd-typography"><a id="md:dbdteamhumanizator" class="tsd-anchor"></a><h1><a href="#md:dbdteamhumanizator">@dbdteam/humanizator</a></h1><a id="md:getting-started-with-the-dependency" class="tsd-anchor"></a><h2><a href="#md:getting-started-with-the-dependency">Getting Started with the Dependency</a></h2><p>Humanizator is an essential tool for any developer looking to improve the <strong>readability and comprehension</strong> of time data in their applications. It converts time units into a <strong>human-friendly format</strong>, making the interpretation of <strong>dates and durations</strong> easier for users of all kinds. Whether you're building a scheduling application, a social media platform, or a project management system, Humanizator ensures that time data is presented in a clear and understandable way, thereby enhancing user experience and the usability of your application.</p>
<a id="md:example-of-client-initialization" class="tsd-anchor"></a><h2><a href="#md:example-of-client-initialization">Example of Client Initialization</a></h2><pre><code class="language-js"><span class="hl-0">const</span><span class="hl-1"> { </span><span class="hl-2">HumanizerClient</span><span class="hl-1">, </span><span class="hl-2">DefaultConfig</span><span class="hl-1"> } = </span><span class="hl-3">require</span><span class="hl-1">(</span><span class="hl-4">"@dbdteam/humanizator"</span><span class="hl-1">)</span><br/><br/><span class="hl-0">const</span><span class="hl-1"> </span><span class="hl-2">client</span><span class="hl-1"> = </span><span class="hl-0">new</span><span class="hl-1"> </span><span class="hl-3">HumanizerClient</span><span class="hl-1">(</span><span class="hl-5">DefaultConfig</span><span class="hl-1">)</span><br/><br/><span class="hl-6">// This is 24 minutes.</span><br/><span class="hl-0">const</span><span class="hl-1"> </span><span class="hl-2">times</span><span class="hl-1"> = [</span><br/><span class="hl-1"> </span><span class="hl-7">1000</span><span class="hl-1"> * </span><span class="hl-7">60</span><span class="hl-1"> * </span><span class="hl-7">24</span><span class="hl-1">,</span><br/><span class="hl-1"> </span><span class="hl-5">Date</span><span class="hl-1">.</span><span class="hl-3">now</span><span class="hl-1">() + </span><span class="hl-7">1000</span><span class="hl-1"> * </span><span class="hl-7">60</span><span class="hl-1"> * </span><span class="hl-7">24</span><span class="hl-1">,</span><br/><span class="hl-1"> </span><span class="hl-0">new</span><span class="hl-1"> </span><span class="hl-3">Date</span><span class="hl-1">(</span><span class="hl-5">Date</span><span class="hl-1">.</span><span class="hl-3">now</span><span class="hl-1">() + </span><span class="hl-7">1000</span><span class="hl-1"> * </span><span class="hl-7">60</span><span class="hl-1"> * </span><span class="hl-7">24</span><span class="hl-1">)</span><br/><span class="hl-1"> ]</span><br/><br/><span class="hl-0">const</span><span class="hl-1"> </span><span class="hl-2">results</span><span class="hl-1"> = [</span><br/><span class="hl-1"> </span><span class="hl-5">client</span><span class="hl-1">.</span><span class="hl-3">humanizeMilliseconds</span><span class="hl-1">(</span><span class="hl-5">times</span><span class="hl-1">[</span><span class="hl-7">0</span><span class="hl-1">]),</span><br/><span class="hl-1"> </span><span class="hl-5">client</span><span class="hl-1">.</span><span class="hl-3">humanizeStamps</span><span class="hl-1">(</span><span class="hl-5">times</span><span class="hl-1">[</span><span class="hl-7">1</span><span class="hl-1">]),</span><br/><span class="hl-1"> </span><span class="hl-5">client</span><span class="hl-1">.</span><span class="hl-3">humanizeDates</span><span class="hl-1">(</span><span class="hl-5">times</span><span class="hl-1">[</span><span class="hl-7">2</span><span class="hl-1">])</span><br/><span class="hl-1"> ]</span><br/><br/><span class="hl-5">console</span><span class="hl-1">.</span><span class="hl-3">log</span><span class="hl-1">(...</span><span class="hl-5">results</span><span class="hl-1">)</span>
</code><button>Copy</button></pre>
<a id="md:also-you-can-check-the-documentation" class="tsd-anchor"></a><h3><a href="#md:also-you-can-check-the-documentation">Also you can check the documentation!</a></h3><p><a href="https://dbdteam.github.io/humanizatordocs.github.io/">Click here to go to our documentation</a></p>
</div></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-index-accordion"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><use href="assets/icons.svg#icon-chevronDown"></use></svg>Settings</h3></summary><div class="tsd-accordion-details"><div class="tsd-filter-visibility"><h4 class="uppercase">Member Visibility</h4><form><ul id="tsd-filter-options"><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-protected" name="protected"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Protected</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-private" name="private"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Private</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>External</span></label></li></ul></form></div><div class="tsd-theme-toggle"><h4 class="uppercase">Theme</h4><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div><details open class="tsd-index-accordion tsd-page-navigation"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><use href="assets/icons.svg#icon-chevronDown"></use></svg>On This Page</h3></summary><div class="tsd-accordion-details"><a href="#md:dbdteamhumanizator"><span>@dbdteam/humanizator</span></a><ul><li><a href="#md:getting-started-with-the-dependency"><span>Getting <wbr/>Started with the <wbr/>Dependency</span></a></li><li><a href="#md:example-of-client-initialization"><span>Example of <wbr/>Client <wbr/>Initialization</span></a></li><li><ul><li><a href="#md:also-you-can-check-the-documentation"><span>Also you can check the documentation!</span></a></li></ul></li></ul></div></details></div><div class="site-menu"><nav class="tsd-navigation"><a href="index.html" class="current"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="assets/icons.svg#icon-1"></use></svg><span>@dbdteam/humanizator</span></a><ul class="tsd-small-nested-navigation" id="tsd-nav-container" data-base="."><li>Loading...</li></ul></nav></div></div></div><footer><p class="tsd-generator">Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></footer><div class="overlay"></div><script>
try {
const generateLinkElement = document.querySelector(".tsd-generator a");
const link = document.createElement("a");
Object.assign(link, {
href: "https://github.com/dmnsgn/typedoc-material-theme",
target: "_blank",
rel: "noreferrer",
innerText: "typedoc-material-theme."
});
generateLinkElement.insertAdjacentElement("afterend", link);
generateLinkElement.insertAdjacentText("afterend", " with ");
} catch (error) {
}
</script></body></html>