1 | <!doctype html>
|
2 | <html>
|
3 |
|
4 | <head>
|
5 | <meta name="generator" content="JSDoc 3.6.2">
|
6 | <meta charset="utf-8">
|
7 | <title>keyu 2.0.0 » Module: types</title>
|
8 | <link rel="stylesheet" href="https://brick.a.ssl.fastly.net/Karla:400,400i,700,700i" type="text/css">
|
9 | <link rel="stylesheet" href="https://brick.a.ssl.fastly.net/Noto+Serif:400,400i,700,700i" type="text/css">
|
10 | <link rel="stylesheet" href="https://brick.a.ssl.fastly.net/Inconsolata:500" type="text/css">
|
11 | <link href="css/baseline.css" rel="stylesheet">
|
12 | </head>
|
13 |
|
14 | <body onload="prettyPrint()">
|
15 | <nav id="jsdoc-navbar" role="navigation" class="jsdoc-navbar">
|
16 | <div id="jsdoc-navbar-container">
|
17 | <div id="jsdoc-navbar-content">
|
18 | <a href="index.html" class="jsdoc-navbar-package-name">keyu 2.<wbr>0.<wbr>0</a>
|
19 | </div>
|
20 | </div>
|
21 | </nav>
|
22 | <div id="jsdoc-body-container">
|
23 | <div id="jsdoc-content">
|
24 | <div id="jsdoc-content-container">
|
25 | <div id="jsdoc-main" role="main">
|
26 | <header class="page-header">
|
27 | <div class="symbol-detail-labels"><span class="label label-kind">module</span></div>
|
28 | <h1><small></small><span class="symbol-name">types</span></h1>
|
29 | <p class="source-link">Source: <a href="types_index.js.html">types/<wbr>index.<wbr>js</a></p>
|
30 | <div class="symbol-description">
|
31 | </div>
|
32 | <dl class="dl-compact">
|
33 | </dl>
|
34 | </header>
|
35 | <section id="summary">
|
36 | <div class="summary-callout">
|
37 | <h2 class="summary-callout-heading">Methods</h2>
|
38 | <div class="summary-content">
|
39 | <div class="summary-column">
|
40 | <dl class="dl-summary-callout">
|
41 | <dt><a href="module-types.html#~getFuncName">getFuncName([defaultValue])</a></dt>
|
42 | <dd>
|
43 | </dd>
|
44 | <dt><a href="module-types.html#~isNil">isNil(num)</a></dt>
|
45 | <dd>
|
46 | </dd>
|
47 | </dl>
|
48 | </div>
|
49 | <div class="summary-column">
|
50 | <dl class="dl-summary-callout">
|
51 | <dt><a href="module-types.html#~isNumber">isNumber(num)</a></dt>
|
52 | <dd>
|
53 | </dd>
|
54 | <dt><a href="module-types.html#~isObject">isObject(num)</a></dt>
|
55 | <dd>
|
56 | </dd>
|
57 | </dl>
|
58 | </div>
|
59 | <div class="summary-column">
|
60 | </div>
|
61 | </div>
|
62 | </div>
|
63 | </section>
|
64 | <section>
|
65 | <h2>Methods</h2>
|
66 | <section>
|
67 | <div class="symbol-detail-labels"><span class="label label-inner">inner</span></div>
|
68 | <h3 id="~getFuncName"><span class="symbol-name">getFuncName</span><span class="signature"><span class="signature-params">([defaultValue])</span> → <span class="signature-returns"> String</span></span></h3>
|
69 | <p>Returns the name of the function in which is called.</p>
|
70 | <section>
|
71 | <h4>
|
72 | Example
|
73 | </h4>
|
74 | <div>
|
75 | <pre class="prettyprint"><code>const hello = () => getFuncName()
|
76 | hello() // -> "hello"
|
77 | getFuncName() // -> "Unknown"
|
78 | getFuncName("ups") // -> "ups"</code></pre>
|
79 | </div>
|
80 | </section>
|
81 | <section>
|
82 | <h4>Parameter</h4>
|
83 | <table class="jsdoc-details-table">
|
84 | <thead>
|
85 | <tr>
|
86 | <th>Name</th>
|
87 | <th>Type</th>
|
88 | <th>Optional</th>
|
89 | <th>Description</th>
|
90 | </tr>
|
91 | </thead>
|
92 | <tbody>
|
93 | <tr>
|
94 | <td>
|
95 | <p>defaultValue</p>
|
96 | </td>
|
97 | <td>
|
98 | <p>String</p>
|
99 | </td>
|
100 | <td>
|
101 | <p>Yes</p>
|
102 | </td>
|
103 | <td>
|
104 | <p>string for unknown calls.</p>
|
105 | <p>Defaults to <code>Unknown</code>.</p>
|
106 | </td>
|
107 | </tr>
|
108 | </tbody>
|
109 | </table>
|
110 | </section>
|
111 | <dl class="dl-compact">
|
112 | <dt>See also</dt>
|
113 | <dd>
|
114 | <p><a href="https://github.com/nerac/keyu/blob/master/test/typesTest.js">typesTest.js</a></p>
|
115 | </dd>
|
116 | <dt>Returns</dt>
|
117 | <dd>
|
118 | <p><code>String</code> <p>indicating the possible name of the function</p>
|
119 | </p>
|
120 | </dd>
|
121 | </dl>
|
122 | <div class="symbol-detail-labels"><span class="label label-inner">inner</span></div>
|
123 | <h3 id="~isNil"><span class="symbol-name">isNil</span><span class="signature"><span class="signature-params">(num)</span> → <span class="signature-returns"> boolean</span></span></h3>
|
124 | <p>Checks if the passed type is a non defined value, either <code>undefined</code> or <code>null</code></p>
|
125 | <section>
|
126 | <h4>
|
127 | Example
|
128 | </h4>
|
129 | <div>
|
130 | <pre class="prettyprint"><code>isNil(null) // -> true
|
131 | isNil(3) // -> false
|
132 | isNil() // -> true
|
133 | isNil(undefined) // -> true</code></pre>
|
134 | </div>
|
135 | </section>
|
136 | <section>
|
137 | <h4>Parameter</h4>
|
138 | <table class="jsdoc-details-table">
|
139 | <thead>
|
140 | <tr>
|
141 | <th>Name</th>
|
142 | <th>Type</th>
|
143 | <th>Optional</th>
|
144 | <th>Description</th>
|
145 | </tr>
|
146 | </thead>
|
147 | <tbody>
|
148 | <tr>
|
149 | <td>
|
150 | <p>num</p>
|
151 | </td>
|
152 | <td>
|
153 | <p>any type</p>
|
154 | </td>
|
155 | <td>
|
156 | <p> </p>
|
157 | </td>
|
158 | <td>
|
159 | <p>any possible data type</p>
|
160 | </td>
|
161 | </tr>
|
162 | </tbody>
|
163 | </table>
|
164 | </section>
|
165 | <dl class="dl-compact">
|
166 | <dt>See also</dt>
|
167 | <dd>
|
168 | <p><a href="https://github.com/nerac/keyu/blob/master/test/typesTest.js">typesTest.js</a></p>
|
169 | </dd>
|
170 | <dt>Returns</dt>
|
171 | <dd>
|
172 | <p><code>boolean</code> <p>indicating if it's an non defined</p>
|
173 | </p>
|
174 | </dd>
|
175 | </dl>
|
176 | <div class="symbol-detail-labels"><span class="label label-inner">inner</span></div>
|
177 | <h3 id="~isNumber"><span class="symbol-name">isNumber</span><span class="signature"><span class="signature-params">(num)</span> → <span class="signature-returns"> boolean</span></span></h3>
|
178 | <p>Checks <strong>correctly</strong> if the passed type is or not a <strong>number</strong></p>
|
179 | <section>
|
180 | <h4>
|
181 | Example
|
182 | </h4>
|
183 | <div>
|
184 | <pre class="prettyprint"><code>isNumber(null) // -> false note isNaN(null) will return false instead</code></pre>
|
185 | </div>
|
186 | </section>
|
187 | <section>
|
188 | <h4>Parameter</h4>
|
189 | <table class="jsdoc-details-table">
|
190 | <thead>
|
191 | <tr>
|
192 | <th>Name</th>
|
193 | <th>Type</th>
|
194 | <th>Optional</th>
|
195 | <th>Description</th>
|
196 | </tr>
|
197 | </thead>
|
198 | <tbody>
|
199 | <tr>
|
200 | <td>
|
201 | <p>num</p>
|
202 | </td>
|
203 | <td>
|
204 | <p>any type</p>
|
205 | </td>
|
206 | <td>
|
207 | <p> </p>
|
208 | </td>
|
209 | <td>
|
210 | <p>any possible data type</p>
|
211 | </td>
|
212 | </tr>
|
213 | </tbody>
|
214 | </table>
|
215 | </section>
|
216 | <dl class="dl-compact">
|
217 | <dt>See also</dt>
|
218 | <dd>
|
219 | <p><a href="https://github.com/nerac/keyu/blob/master/test/typesTest.js">typesTest.js</a></p>
|
220 | </dd>
|
221 | <dt>Returns</dt>
|
222 | <dd>
|
223 | <p><code>boolean</code> <p>indicating if is a number or not</p>
|
224 | </p>
|
225 | </dd>
|
226 | </dl>
|
227 | <div class="symbol-detail-labels"><span class="label label-inner">inner</span></div>
|
228 | <h3 id="~isObject"><span class="symbol-name">isObject</span><span class="signature"><span class="signature-params">(num)</span> → <span class="signature-returns"> boolean</span></span></h3>
|
229 | <p>Checks <strong>correctly</strong> if the passed type is or not an <strong>object</strong></p>
|
230 | <section>
|
231 | <h4>
|
232 | Example
|
233 | </h4>
|
234 | <div>
|
235 | <pre class="prettyprint"><code>isObject(null) // -> false note that typeof will return true
|
236 | isObject({}) // -> true
|
237 | isObject(new Error()) // -> true</code></pre>
|
238 | </div>
|
239 | </section>
|
240 | <section>
|
241 | <h4>Parameter</h4>
|
242 | <table class="jsdoc-details-table">
|
243 | <thead>
|
244 | <tr>
|
245 | <th>Name</th>
|
246 | <th>Type</th>
|
247 | <th>Optional</th>
|
248 | <th>Description</th>
|
249 | </tr>
|
250 | </thead>
|
251 | <tbody>
|
252 | <tr>
|
253 | <td>
|
254 | <p>num</p>
|
255 | </td>
|
256 | <td>
|
257 | <p>any type</p>
|
258 | </td>
|
259 | <td>
|
260 | <p> </p>
|
261 | </td>
|
262 | <td>
|
263 | <p>any possible data type</p>
|
264 | </td>
|
265 | </tr>
|
266 | </tbody>
|
267 | </table>
|
268 | </section>
|
269 | <dl class="dl-compact">
|
270 | <dt>See also</dt>
|
271 | <dd>
|
272 | <p><a href="https://github.com/nerac/keyu/blob/master/test/typesTest.js">typesTest.js</a></p>
|
273 | </dd>
|
274 | <dt>Returns</dt>
|
275 | <dd>
|
276 | <p><code>boolean</code> <p>indicating if it's an object or not</p>
|
277 | </p>
|
278 | </dd>
|
279 | </dl>
|
280 | </section>
|
281 | </section>
|
282 | </div>
|
283 | </div>
|
284 | <nav id="jsdoc-toc-nav" role="navigation"></nav>
|
285 | </div>
|
286 | </div>
|
287 | <footer id="jsdoc-footer" class="jsdoc-footer">
|
288 | <div id="jsdoc-footer-container">
|
289 | <p>
|
290 | Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.2 on June 17, 2019.
|
291 | </p>
|
292 | </div>
|
293 | </footer>
|
294 | <script src="scripts/jquery.min.js"></script>
|
295 | <script src="scripts/jquery.cookie.js"></script>
|
296 | <script src="scripts/tree.jquery.js"></script>
|
297 | <script src="scripts/prettify.js"></script>
|
298 | <script src="scripts/jsdoc-toc.js"></script>
|
299 | <script src="scripts/linenumber.js"></script>
|
300 | <script src="scripts/scrollanchor.js"></script>
|
301 | </body>
|
302 |
|
303 | </html> |
\ | No newline at end of file |