-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
286 lines (224 loc) · 30.6 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
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Home - eXir</title>
<meta name="description" content="Javascript Library" />
<meta property="og:title" content=""/>
<meta property="og:type" content="website"/>
<meta property="og:image" content=""/>
<meta property="og:url" content=""/>
<script src="scripts/prettify/prettify.js"></script>
<script src="scripts/prettify/lang-css.js"></script>
<!--[if lt IE 9]>
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<link type="text/css" rel="stylesheet" href="styles/prettify.css">
<link type="text/css" rel="stylesheet" href="styles/jsdoc.css">
<script src="scripts/nav.js" defer></script>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
</head>
<body>
<input type="checkbox" id="nav-trigger" class="nav-trigger" />
<label for="nav-trigger" class="navicon-button x">
<div class="navicon"></div>
</label>
<label for="nav-trigger" class="overlay"></label>
<nav >
<input type="text" id="nav-search" placeholder="Search" />
<h2><a href="index.html">Home</a></h2><h2><a href="https://github.com/kasra-sh/exir" target="_blank" class="menu-item" id="website_link" >Project Website</a></h2><h3>Tutorials</h3><ul><li><a href="tutorial-t00_introduction.html">Introduction</a></li><li><a href="tutorial-t01_installation.html">Installation</a></li><li><a href="tutorial-t02_getting_started.html">Getting Started</a></li><li><a href="tutorial-t03_core.html">Core module</a></li></ul><h3>Modules</h3><ul><li><a href="core.module_core_cases.html">core/cases</a><ul class='methods'><li data-type='method' style='display: none;'><a href="core.module_core_cases.html#.kebab">kebab</a></li><li data-type='method' style='display: none;'><a href="core.module_core_cases.html#.snake">snake</a></li><li data-type='method' style='display: none;'><a href="core.module_core_cases.html#.camel">camel</a></li><li data-type='method' style='display: none;'><a href="core.module_core_cases.html#.pascal">pascal</a></li></ul></li><li><a href="core.module_core_collections.html">core/collections</a><ul class='methods'><li data-type='method' style='display: none;'><a href="core.module_core_collections.html#~item">item</a></li><li data-type='method' style='display: none;'><a href="core.module_core_collections.html#~contains">contains</a></li><li data-type='method' style='display: none;'><a href="core.module_core_collections.html#~add">add</a></li><li data-type='method' style='display: none;'><a href="core.module_core_collections.html#~remove">remove</a></li><li data-type='method' style='display: none;'><a href="core.module_core_collections.html#~toggle">toggle</a></li><li data-type='method' style='display: none;'><a href="core.module_core_collections.html#~emptyOf">emptyOf</a></li><li data-type='method' style='display: none;'><a href="core.module_core_collections.html#~concat">concat</a></li><li data-type='method' style='display: none;'><a href="core.module_core_collections.html#~objectValues">objectValues</a></li><li data-type='method' style='display: none;'><a href="core.module_core_collections.html#~forN">forN</a></li><li data-type='method' style='display: none;'><a href="core.module_core_collections.html#~forEachRange">forEachRange</a></li><li data-type='method' style='display: none;'><a href="core.module_core_collections.html#~forEach">forEach</a></li><li data-type='method' style='display: none;'><a href="core.module_core_collections.html#~forEachRight">forEachRight</a></li><li data-type='method' style='display: none;'><a href="core.module_core_collections.html#~firstIndex">firstIndex</a></li><li data-type='method' style='display: none;'><a href="core.module_core_collections.html#~first">first</a></li><li data-type='method' style='display: none;'><a href="core.module_core_collections.html#~startsWith">startsWith</a></li><li data-type='method' style='display: none;'><a href="core.module_core_collections.html#~lastIndex">lastIndex</a></li><li data-type='method' style='display: none;'><a href="core.module_core_collections.html#~last">last</a></li><li data-type='method' style='display: none;'><a href="core.module_core_collections.html#~endsWith">endsWith</a></li><li data-type='method' style='display: none;'><a href="core.module_core_collections.html#~reverse">reverse</a></li><li data-type='method' style='display: none;'><a href="core.module_core_collections.html#~any">any</a></li><li data-type='method' style='display: none;'><a href="core.module_core_collections.html#~all">all</a></li><li data-type='method' style='display: none;'><a href="core.module_core_collections.html#~filter">filter</a></li><li data-type='method' style='display: none;'><a href="core.module_core_collections.html#~omit">omit</a></li><li data-type='method' style='display: none;'><a href="core.module_core_collections.html#~filterRight">filterRight</a></li><li data-type='method' style='display: none;'><a href="core.module_core_collections.html#~maxIndex">maxIndex</a></li><li data-type='method' style='display: none;'><a href="core.module_core_collections.html#~max">max</a></li><li data-type='method' style='display: none;'><a href="core.module_core_collections.html#~minIndex">minIndex</a></li><li data-type='method' style='display: none;'><a href="core.module_core_collections.html#~min">min</a></li><li data-type='method' style='display: none;'><a href="core.module_core_collections.html#~map">map</a></li><li data-type='method' style='display: none;'><a href="core.module_core_collections.html#~flatMap">flatMap</a></li><li data-type='method' style='display: none;'><a href="core.module_core_collections.html#~reduce">reduce</a></li><li data-type='method' style='display: none;'><a href="core.module_core_collections.html#~reduceRight">reduceRight</a></li><li data-type='method' style='display: none;'><a href="core.module_core_collections.html#~keyValuePairs">keyValuePairs</a></li><li data-type='method' style='display: none;'><a href="core.module_core_collections.html#~entries">entries</a></li><li data-type='method' style='display: none;'><a href="core.module_core_collections.html#~translateObject">translateObject</a></li><li data-type='method' style='display: none;'><a href="core.module_core_collections.html#~deepMerge">deepMerge</a></li><li data-type='method' style='display: none;'><a href="core.module_core_collections.html#~deepClone">deepClone</a></li><li data-type='method' style='display: none;'><a href="core.module_core_collections.html#~join">join</a></li><li data-type='method' style='display: none;'><a href="core.module_core_collections.html#~groupBy">groupBy</a></li></ul></li><li><a href="core.module_core_functions.html">core/functions</a><ul class='methods'><li data-type='method' style='display: none;'><a href="core.module_core_functions.html#~funcBodyEquals">funcBodyEquals</a></li><li data-type='method' style='display: none;'><a href="core.module_core_functions.html#~throttle">throttle</a></li><li data-type='method' style='display: none;'><a href="core.module_core_functions.html#~debounce">debounce</a></li><li data-type='method' style='display: none;'><a href="core.module_core_functions.html#~bindArgs">bindArgs</a></li></ul></li><li><a href="core.module_core_logging.html">core/logging</a><ul class='methods'><li data-type='method' style='display: none;'><a href="core.module_core_logging.html#~showTrace">showTrace</a></li><li data-type='method' style='display: none;'><a href="core.module_core_logging.html#~showInfo">showInfo</a></li><li data-type='method' style='display: none;'><a href="core.module_core_logging.html#~showWarn">showWarn</a></li><li data-type='method' style='display: none;'><a href="core.module_core_logging.html#~showError">showError</a></li><li data-type='method' style='display: none;'><a href="core.module_core_logging.html#~silent">silent</a></li><li data-type='method' style='display: none;'><a href="core.module_core_logging.html#~lvl">lvl</a></li><li data-type='method' style='display: none;'><a href="core.module_core_logging.html#~trace">trace</a></li><li data-type='method' style='display: none;'><a href="core.module_core_logging.html#~info">info</a></li><li data-type='method' style='display: none;'><a href="core.module_core_logging.html#~warn">warn</a></li><li data-type='method' style='display: none;'><a href="core.module_core_logging.html#~error">error</a></li></ul></li><li><a href="core.module_core_strings.html">core/strings</a><ul class='methods'><li data-type='method' style='display: none;'><a href="core.module_core_strings.html#~isDecimal">isDecimal</a></li><li data-type='method' style='display: none;'><a href="core.module_core_strings.html#~isBinary">isBinary</a></li><li data-type='method' style='display: none;'><a href="core.module_core_strings.html#~isOctal">isOctal</a></li><li data-type='method' style='display: none;'><a href="core.module_core_strings.html#~isHex">isHex</a></li><li data-type='method' style='display: none;'><a href="core.module_core_strings.html#~isEmail">isEmail</a></li><li data-type='method' style='display: none;'><a href="core.module_core_strings.html#~startsWith">startsWith</a></li><li data-type='method' style='display: none;'><a href="core.module_core_strings.html#~endsWith">endsWith</a></li><li data-type='method' style='display: none;'><a href="core.module_core_strings.html#~contains">contains</a></li></ul></li><li><a href="core.module_core_types.html">core/types</a><ul class='methods'><li data-type='method' style='display: none;'><a href="core.module_core_types.html#~typeName">typeName</a></li><li data-type='method' style='display: none;'><a href="core.module_core_types.html#~isUnd">isUnd</a></li><li data-type='method' style='display: none;'><a href="core.module_core_types.html#~isNull">isNull</a></li><li data-type='method' style='display: none;'><a href="core.module_core_types.html#~isVal">isVal</a></li><li data-type='method' style='display: none;'><a href="core.module_core_types.html#~isNum">isNum</a></li><li data-type='method' style='display: none;'><a href="core.module_core_types.html#~isStr">isStr</a></li><li data-type='method' style='display: none;'><a href="core.module_core_types.html#~isFun">isFun</a></li><li data-type='method' style='display: none;'><a href="core.module_core_types.html#~isObj">isObj</a></li><li data-type='method' style='display: none;'><a href="core.module_core_types.html#~isArr">isArr</a></li><li data-type='method' style='display: none;'><a href="core.module_core_types.html#~isPrim">isPrim</a></li><li data-type='method' style='display: none;'><a href="core.module_core_types.html#~isList">isList</a></li><li data-type='method' style='display: none;'><a href="core.module_core_types.html#~isMutableList">isMutableList</a></li><li data-type='method' style='display: none;'><a href="core.module_core_types.html#~isSet">isSet</a></li><li data-type='method' style='display: none;'><a href="core.module_core_types.html#~isMap">isMap</a></li><li data-type='method' style='display: none;'><a href="core.module_core_types.html#~isError">isError</a></li><li data-type='method' style='display: none;'><a href="core.module_core_types.html#~isEl">isEl</a></li><li data-type='method' style='display: none;'><a href="core.module_core_types.html#~isEls">isEls</a></li><li data-type='method' style='display: none;'><a href="core.module_core_types.html#~hasField">hasField</a></li><li data-type='method' style='display: none;'><a href="core.module_core_types.html#~isEmpty">isEmpty</a></li><li data-type='method' style='display: none;'><a href="core.module_core_types.html#~dict">dict</a></li></ul></li><li><a href="http.module_http_ajax.html">http/ajax</a></li><li><a href="http.module_http_client.html">http/client</a></li><li><a href="module-http_methods.html">http/methods</a><ul class='methods'><li data-type='method' style='display: none;'><a href="module-http_methods.html#~makeRequest">makeRequest</a></li><li data-type='method' style='display: none;'><a href="module-http_methods.html#~sendRequest">sendRequest</a></li><li data-type='method' style='display: none;'><a href="module-http_methods.html#~Get">Get</a></li><li data-type='method' style='display: none;'><a href="module-http_methods.html#~Post">Post</a></li><li data-type='method' style='display: none;'><a href="module-http_methods.html#~Delete">Delete</a></li><li data-type='method' style='display: none;'><a href="module-http_methods.html#~Put">Put</a></li><li data-type='method' style='display: none;'><a href="module-http_methods.html#~Patch">Patch</a></li><li data-type='method' style='display: none;'><a href="module-http_methods.html#~sendGet">sendGet</a></li><li data-type='method' style='display: none;'><a href="module-http_methods.html#~sendDelete">sendDelete</a></li><li data-type='method' style='display: none;'><a href="module-http_methods.html#~sendPost">sendPost</a></li><li data-type='method' style='display: none;'><a href="module-http_methods.html#~sendPut">sendPut</a></li><li data-type='method' style='display: none;'><a href="module-http_methods.html#~sendPatch">sendPatch</a></li></ul></li><li><a href="dom.module_DOM.html">DOM</a><ul class='methods'><li data-type='method' style='display: none;'><a href="dom.module_DOM.html#~append">append</a></li><li data-type='method' style='display: none;'><a href="dom.module_DOM.html#~getAttributes">getAttributes</a></li><li data-type='method' style='display: none;'><a href="dom.module_DOM.html#~hasAttr">hasAttr</a></li><li data-type='method' style='display: none;'><a href="dom.module_DOM.html#~getAttr">getAttr</a></li><li data-type='method' style='display: none;'><a href="dom.module_DOM.html#~setAttr">setAttr</a></li><li data-type='method' style='display: none;'><a href="dom.module_DOM.html#~attrs">attrs</a></li><li data-type='method' style='display: none;'><a href="dom.module_DOM.html#~cls">cls</a></li><li data-type='method' style='display: none;'><a href="dom.module_DOM.html#~addClass">addClass</a></li><li data-type='method' style='display: none;'><a href="dom.module_DOM.html#~removeClass">removeClass</a></li><li data-type='method' style='display: none;'><a href="dom.module_DOM.html#~hasClass">hasClass</a></li><li data-type='method' style='display: none;'><a href="dom.module_DOM.html#~toggleClass">toggleClass</a></li><li data-type='method' style='display: none;'><a href="dom.module_DOM.html#~setEvent">setEvent</a></li><li data-type='method' style='display: none;'><a href="dom.module_DOM.html#~clearEvent">clearEvent</a></li><li data-type='method' style='display: none;'><a href="dom.module_DOM.html#~hasEvent">hasEvent</a></li><li data-type='method' style='display: none;'><a href="dom.module_DOM.html#~patch">patch</a></li><li data-type='method' style='display: none;'><a href="dom.module_DOM.html#~relLeft">relLeft</a></li><li data-type='method' style='display: none;'><a href="dom.module_DOM.html#~absLeft">absLeft</a></li><li data-type='method' style='display: none;'><a href="dom.module_DOM.html#~relWidth">relWidth</a></li><li data-type='method' style='display: none;'><a href="dom.module_DOM.html#~absWidth">absWidth</a></li><li data-type='method' style='display: none;'><a href="dom.module_DOM.html#~relRight">relRight</a></li><li data-type='method' style='display: none;'><a href="dom.module_DOM.html#~absRight">absRight</a></li><li data-type='method' style='display: none;'><a href="dom.module_DOM.html#~relTop">relTop</a></li><li data-type='method' style='display: none;'><a href="dom.module_DOM.html#~absTop">absTop</a></li><li data-type='method' style='display: none;'><a href="dom.module_DOM.html#~relHeight">relHeight</a></li><li data-type='method' style='display: none;'><a href="dom.module_DOM.html#~absHeight">absHeight</a></li><li data-type='method' style='display: none;'><a href="dom.module_DOM.html#~relBottom">relBottom</a></li><li data-type='method' style='display: none;'><a href="dom.module_DOM.html#~absBottom">absBottom</a></li><li data-type='method' style='display: none;'><a href="dom.module_DOM.html#~$">$</a></li><li data-type='method' style='display: none;'><a href="dom.module_DOM.html#~$$">$$</a></li><li data-type='method' style='display: none;'><a href="dom.module_DOM.html#~queryOf">queryOf</a></li><li data-type='method' style='display: none;'><a href="dom.module_DOM.html#~style">style</a></li><li data-type='method' style='display: none;'><a href="dom.module_DOM.html#~hasStyle">hasStyle</a></li><li data-type='method' style='display: none;'><a href="dom.module_DOM.html#~parseQuery">parseQuery</a></li></ul></li><li></li><li></li><li></li><li></li><li></li><li></li><li></li><li></li></ul><h3>Namespaces</h3><ul><li><a href="core.html">core</a></li><li><a href="http.html">http</a></li><li><a href="dom.html">dom</a></li></ul><h3>Classes</h3><ul><li><a href="core.Extension.html">Extension</a><ul class='methods'><li data-type='method' style='display: none;'><a href="core.Extension.html#define">define</a></li></ul></li><li><a href="core.module_core_types-Enum.html">Enum</a></li><li><a href="http.module_http_ajax-Ajax.html">Ajax</a><ul class='methods'><li data-type='method' style='display: none;'><a href="http.module_http_ajax-Ajax.html#header">header</a></li><li data-type='method' style='display: none;'><a href="http.module_http_ajax-Ajax.html#headers">headers</a></li><li data-type='method' style='display: none;'><a href="http.module_http_ajax-Ajax.html#onSuccess">onSuccess</a></li><li data-type='method' style='display: none;'><a href="http.module_http_ajax-Ajax.html#onUploadSuccess">onUploadSuccess</a></li><li data-type='method' style='display: none;'><a href="http.module_http_ajax-Ajax.html#onFail">onFail</a></li><li data-type='method' style='display: none;'><a href="http.module_http_ajax-Ajax.html#onProgress">onProgress</a></li><li data-type='method' style='display: none;'><a href="http.module_http_ajax-Ajax.html#onUploadProgress">onUploadProgress</a></li><li data-type='method' style='display: none;'><a href="http.module_http_ajax-Ajax.html#withContent">withContent</a></li><li data-type='method' style='display: none;'><a href="http.module_http_ajax-Ajax.html#xmlData">xmlData</a></li><li data-type='method' style='display: none;'><a href="http.module_http_ajax-Ajax.html#formData">formData</a></li><li data-type='method' style='display: none;'><a href="http.module_http_ajax-Ajax.html#jsonData">jsonData</a></li><li data-type='method' style='display: none;'><a href="http.module_http_ajax-Ajax.html#urlEncodedData">urlEncodedData</a></li><li data-type='method' style='display: none;'><a href="http.module_http_ajax-Ajax.html#send">send</a></li><li data-type='method' style='display: none;'><a href="http.module_http_ajax-Ajax.html#sendAsync">sendAsync</a></li></ul></li><li><a href="http.module_http_client-XHttpClient.html">XHttpClient</a><ul class='methods'><li data-type='method' style='display: none;'><a href="http.module_http_client-XHttpClient.html#send">send</a></li><li data-type='method' style='display: none;'><a href="http.module_http_client-XHttpClient.html#get">get</a></li><li data-type='method' style='display: none;'><a href="http.module_http_client-XHttpClient.html#post">post</a></li><li data-type='method' style='display: none;'><a href="http.module_http_client-XHttpClient.html#put">put</a></li><li data-type='method' style='display: none;'><a href="http.module_http_client-XHttpClient.html#patch">patch</a></li><li data-type='method' style='display: none;'><a href="http.module_http_client-XHttpClient.html#delete">delete</a></li><li data-type='method' style='display: none;'><a href="http.module_http_client-XHttpClient.html#cancel">cancel</a></li></ul></li><li><a href="http.HttpContent.html">HttpContent</a></li><li><a href="http.HttpRq.html">HttpRq</a><ul class='methods'><li data-type='method' style='display: none;'><a href="http.HttpRq.html#setMethod">setMethod</a></li><li data-type='method' style='display: none;'><a href="http.HttpRq.html#setUrl">setUrl</a></li><li data-type='method' style='display: none;'><a href="http.HttpRq.html#setArg">setArg</a></li><li data-type='method' style='display: none;'><a href="http.HttpRq.html#setHeader">setHeader</a></li><li data-type='method' style='display: none;'><a href="http.HttpRq.html#getHeader">getHeader</a></li><li data-type='method' style='display: none;'><a href="http.HttpRq.html#setContent">setContent</a></li><li data-type='method' style='display: none;'><a href="http.HttpRq.html#jsonContent">jsonContent</a></li><li data-type='method' style='display: none;'><a href="http.HttpRq.html#xmlContent">xmlContent</a></li><li data-type='method' style='display: none;'><a href="http.HttpRq.html#formContent">formContent</a></li><li data-type='method' style='display: none;'><a href="http.HttpRq.html#formMultiPartContent">formMultiPartContent</a></li><li data-type='method' style='display: none;'><a href="http.HttpRq.html#formUrlEncodedContent">formUrlEncodedContent</a></li></ul></li><li><a href="http.HttpRs.html">HttpRs</a></li><li><a href="dom.Attributes.html">Attributes</a><ul class='methods'><li data-type='method' style='display: none;'><a href="dom.Attributes.html#keys">keys</a></li><li data-type='method' style='display: none;'><a href="dom.Attributes.html#all">all</a></li><li data-type='method' style='display: none;'><a href="dom.Attributes.html#set">set</a></li><li data-type='method' style='display: none;'><a href="dom.Attributes.html#get">get</a></li><li data-type='method' style='display: none;'><a href="dom.Attributes.html#has">has</a></li><li data-type='method' style='display: none;'><a href="dom.Attributes.html#remove">remove</a></li></ul></li><li><a href="dom.Classes.html">Classes</a><ul class='methods'><li data-type='method' style='display: none;'><a href="dom.Classes.html#.split">split</a></li><li data-type='method' style='display: none;'><a href="dom.Classes.html#.of">of</a></li><li data-type='method' style='display: none;'><a href="dom.Classes.html#contains">contains</a></li><li data-type='method' style='display: none;'><a href="dom.Classes.html#add">add</a></li><li data-type='method' style='display: none;'><a href="dom.Classes.html#remove">remove</a></li><li data-type='method' style='display: none;'><a href="dom.Classes.html#toggle">toggle</a></li></ul></li><li><a href="dom.module_DOM-QueryParams.html">QueryParams</a></li></ul><h3>Global</h3><ul><li><a href="global.html#HttpMethod">HttpMethod</a></li><li><a href="global.html#HttpRequestOptions">HttpRequestOptions</a></li></ul>
</nav>
<div id="main">
<section class="package">
<h3> </h3>
</section>
<section class="readme usertext">
<article><p align="center">
<img width="200px" style="max-width: 70%" src="https://raw.githubusercontent.com/kasra-sh/exir/master/.github/logo.png">
</p>
<br>
<p align="center">
<a href="https://npmjs.org/exir"><img src="https://img.shields.io/npm/v/exir" alt="npm"></a>
<a href="https://opensource.org/licenses/MIT"><img src="https://img.shields.io/badge/License-MIT-informational.svg" alt="License: MIT" /></a>
<img src="https://img.shields.io/badge/Gzipped-15Kb-green" alt="Gzipped Size" />
<img src="https://img.shields.io/badge/Compatibility-Mixed-informational" alt="Compatibility ES5" />
<img src="https://img.shields.io/badge/node->=8-yellow" alt="Node Version >= 8" />
<br>
<h1 align="center"><b>eXir Javascript Library</b></h1>
</p>
<ul>
<li><a href="#what-is-exir">What is eXir?</a></li>
<li><a href="#why-exir">Why eXir?</a></li>
<li><a href="#installation">Installation</a>
<ul>
<li><a href="#package-manager">Package Manager</a></li>
<li><a href="#from-source">From Source</a></li>
</ul>
</li>
<li><a href="#getting-started">Getting Started</a></li>
<li><a href="https://kasra-sh.github.io/exir-docs">Tutorials</a></li>
<li><a href="https://kasra-sh.github.io/exir-docs">Documentation</a></li>
<li><a href="#disclaimer">Disclaimer</a></li>
</ul>
<h2><strong>What is eXir?</strong></h2>
<p>Persian word اکسیر, pronounced <em>ex'ear</em> is a mythical potion which transmutes things to a substance of higher value (iron to gold) or cures all illness.<br>
<strong>eXir</strong> is a lightweight javascript library (which is not just a sentence!), and it is supposed to cure dependency <em>infection</em>!<br></p>
<p>What's included :</p>
<ul>
<li><strong>Core Utils</strong>
<ul>
<li>Extended Collection utilities: chunk, omit, join, etc.</li>
<li>Function helpers: throttle, debounce, etc.</li>
<li>String analyzers and transformers.</li>
<li>Concise Type Checking: isNull, isObj, etc.</li>
</ul>
</li>
<li><strong>DOM Utils</strong>
Basic DOM manipulation utility functions.
<ul>
<li>Flexible, Fool-Proof element/class/attribute/style CRUD</li>
<li>Painless, Predicable Event Handling</li>
<li>Optional native method wrappers for addEventListener, etc. for debugging or other purposes</li>
</ul>
</li>
<li><strong>HTTP Client/Methods</strong>
An elegant wrapper around XHR to satisfy your every request!
<ul>
<li>Convenient Http Methods Get, Post, ...</li>
<li>Supports Promises, async/await</li>
<li>Timeout and retry</li>
<li>Rate Limiting</li>
<li>Request cancellation</li>
</ul>
</li>
<li><strong>Web Components</strong>
Reusable/Dynamic pure js components (css-in-js included).
<ul>
<li>Dynamically Rendered Components (virtual dom)</li>
<li>Reactive State Management <em>(coming soon)</em></li>
<li>Routing <em>(coming soon)</em></li>
</ul>
</li>
</ul>
<p><em>All</em> of the above in a bundle of <em>less than</em> 15Kb gzipped, which could be the size of a whole web app using only what's necessary (tree-shaking).</p>
<h2><strong>Why eXir?</strong></h2>
<p>Many libraries/frameworks exist which claim to be fast/lightweight, are in fact what they claim to be in early releases or first stages of development,
but many start to get bigger and more complicated as they try their hardest to make everything more convenient or add some extra features.
Why make it so abstract and complicated in the first place and then make some more advanced tools to simplify it?
Many web developers are dealing with the constant struggle of making frequent changes and optimization, not because some 16core workstation cannot handle extra lines of javascript,
but for the sake of those not nearly as powerful/optimized mobile browsers (Android, RPi, etc.), the very same devices which are first-class targets for PWAs.</p>
<hr>
<h2><strong>Installation</strong></h2>
<h3>Package Manager</h3>
<p>With your prefered package manager run :</p>
<pre class="prettyprint source lang-shell"><code>$ npm i exir
</code></pre>
<pre class="prettyprint source lang-shell"><code>$ yarn add exir
</code></pre>
<h3>From Source</h3>
<p>Clone the repository and install dependencies using your preferred package manager</p>
<pre class="prettyprint source lang-sh"><code>$ git clone https://github.com/kasra-sh/exir.git
$ cd exir
$ npm install
</code></pre>
<p>To regenerate extensions and bundles, make sure you have <a href="https://parceljs.org">Parcel</a> installed globally:</p>
<pre class="prettyprint source lang-sh"><code>$ npm run bundle
</code></pre>
<hr>
<h2><strong>Getting Started</strong></h2>
<h3>Bundles</h3>
<p>Include a monolithic bundle file directly in your html file, bundle files having "*-ext" suffix include extensions.</p>
<pre class="prettyprint source lang-html"><code><!-- Modern !-->
<script src="exir-bundle-ext.js"></script>
<!-- Legacy !-->
<script src="exir-bundle-legacy-ext.js"></script>
<script>
var obj = {
ABC: "text1",
ACD: "text2",
BAR: 1,
Obj1: { name: "jack" , id: 1},
Obj2: { name: "karen", id: 2},
Obj3: { name: "jack" , id: 3},
Obj3: { name: "karen", id: 4},
}
console.log(obj.$filter((v,k)=>k.$startsWith('A')));
// Outputs object { ABC: "text1", ACD: "text2" }
console.log(obj.$filter(['ABC']));
// Outputs object { ABC: "text1" }
console.log(obj.$filter({name: "jack"}));
// Outputs object { Obj1: { name: "jack", id: 1 }, Obj3: { name: "jack", id: 3 }}
console.log(obj.$filter({name: X.ANY}));
// Outputs object {
// Obj1: { name: "jack" , id: 1},
// Obj2: { name: "karen", id: 2},
// Obj3: { name: "jack" , id: 3},
// Obj3: { name: "karen", id: 4},
// }
</script>
<!-- ... !-->
</code></pre>
<h3>Modules</h3>
<p>CommonJS <code>require()</code> example:</p>
<pre class="prettyprint source lang-js"><code>// Core
// namespace
const X = require("exir/core");
// functions
const {join} = require("exir/core/collections");
const {debounce} = require("exir/core/functions");
// Dom
// namespace
const Dom = require("exir/dom");
// functions
const {toggleClass} = require("exir/dom/classes");
// Http
// namespace
const Http = require("exir/http");
// http methods
const {sendGet, Post} = require("exir/http/methods");
// http client
const {XHttpClient} = require("exir/http/client");
// View-Model
const {mount, Component, VNode} = require("exir/vm/app");
// All Extensions
require("exir/ext");
// Collection Extensions
require("exir/ext/collections.ext");
// Dom Extensions
require("exir/ext/dom.ext");
</code></pre>
<p>ECMAScript Modules(ESM) <code>import</code> example:</p>
<pre class="prettyprint source lang-js"><code>// Core
import {join, flatMap, debounce} from "exir/core/collections"
// Dom
import {css, toggleClass, event} from "exir/dom"
// Http
import {XHttpClient, Get, sendPost} from "exir/http"
// View-Model
import {mount, Component, VNode} from "exir/vm/app"
// All Extensions
import "exir/ext";
// Collection Extensions
import "exir/ext/collections.ext";
// Dom Extensions
import "exir/ext/dom.ext";
</code></pre>
<p>Also read <a href="https://kasra-sh.github.io/exir-docs">Tutorials and Documentation</a></p>
<h2>Disclaimer</h2>
<p>This project is under heavy development, some parts may change, break or be removed.<br>
Documentation is not complete <em>yet</em>, each part's documentation will be added as soon as it seems stable enough.<br>
Parcel's zero-config has helped a LOT but is not a necessity, it is completely fine to use another bundler/transpiler like Webpack, Rollup or other "magic" tools.
eXir is safe to be used beside other libraries, <em>although</em> extensions modify Object prototypes which many deem dangerous, unnecessary or whatever else, use them at your own risk!</p></article>
</section>
</div>
<br class="clear">
<footer>
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.6</a> using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
</footer>
<script>prettyPrint();</script>
<script src="scripts/polyfill.js"></script>
<script src="scripts/linenumber.js"></script>
<script src="scripts/search.js" defer></script>
<script src="scripts/collapse.js" defer></script>
</body>
</html>