UNPKG

31.1 kBHTMLView Raw
1<!DOCTYPE html>
2<html lang="en">
3<head>
4 <meta charset="utf-8">
5 <title>JSDoc: Global</title>
6
7 <script src="scripts/prettify/prettify.js"> </script>
8 <script src="scripts/prettify/lang-css.js"> </script>
9 <!--[if lt IE 9]>
10 <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
11 <![endif]-->
12 <link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css">
13 <link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css">
14</head>
15
16<body>
17
18<div id="main">
19
20 <h1 class="page-title">Global</h1>
21
22
23
24
25
26
27<section>
28
29<header>
30
31 <h2></h2>
32
33
34</header>
35
36<article>
37 <div class="container-overview">
38
39
40
41
42
43
44<dl class="details">
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</dl>
78
79
80
81
82 </div>
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97 <h3 class="subsection-title">Methods</h3>
98
99
100
101
102
103
104 <h4 class="name" id="_ERROR"><span class="type-signature"></span>_ERROR<span class="signature">(err, options)</span><span class="type-signature"> &rarr; {string}</span></h4>
105
106
107
108
109
110<div class="description">
111 <p>Creates a formatted error response message and converts to XML</p>
112</div>
113
114
115
116
117
118
119
120
121
122 <h5>Parameters:</h5>
123
124
125<table class="params">
126 <thead>
127 <tr>
128
129 <th>Name</th>
130
131
132 <th>Type</th>
133
134
135
136
137
138 <th class="last">Description</th>
139 </tr>
140 </thead>
141
142 <tbody>
143
144
145 <tr>
146
147 <td class="name"><code>err</code></td>
148
149
150 <td class="type">
151
152
153<span class="param-type">*</span>
154
155
156
157 </td>
158
159
160
161
162
163 <td class="description last"><p>Error data to be included in error response. If err is an instanceof Error or has a .message property it is assumed that the .message property is the only thing to include in error response</p></td>
164 </tr>
165
166
167
168 <tr>
169
170 <td class="name"><code>options</code></td>
171
172
173 <td class="type">
174
175
176<span class="param-type">Object</span>
177
178
179
180 </td>
181
182
183
184
185
186 <td class="description last"><p>Configurable options for error XML formatting</p>
187 <h6>Properties</h6>
188
189
190<table class="params">
191 <thead>
192 <tr>
193
194 <th>Name</th>
195
196
197 <th>Type</th>
198
199
200 <th>Attributes</th>
201
202
203
204 <th>Default</th>
205
206
207 <th class="last">Description</th>
208 </tr>
209 </thead>
210
211 <tbody>
212
213
214 <tr>
215
216 <td class="name"><code>skip_conversion</code></td>
217
218
219 <td class="type">
220
221
222<span class="param-type">Boolean</span>
223
224
225
226 </td>
227
228
229 <td class="attributes">
230
231 &lt;optional><br>
232
233
234
235
236
237 </td>
238
239
240
241 <td class="default">
242
243 this.skip_conversion
244
245 </td>
246
247
248 <td class="description last"><p>If true rendering is skipped and the data argument is immediately returned</p></td>
249 </tr>
250
251
252
253 <tr>
254
255 <td class="name"><code>xml_root</code></td>
256
257
258 <td class="type">
259
260
261<span class="param-type">string</span>
262
263
264
265 </td>
266
267
268 <td class="attributes">
269
270 &lt;optional><br>
271
272
273
274
275
276 </td>
277
278
279
280 <td class="default">
281
282 this.xml_root
283
284 </td>
285
286
287 <td class="description last"><p>Defines the value of the XML document root tag. If this.xml_root is not set and options.xml_root is not provided a TypeError will be thrown</p></td>
288 </tr>
289
290
291
292 <tr>
293
294 <td class="name"><code>xml_configuration</code></td>
295
296
297 <td class="type">
298
299
300<span class="param-type">Object</span>
301
302
303
304 </td>
305
306
307 <td class="attributes">
308
309
310
311
312
313 </td>
314
315
316
317 <td class="default">
318
319 </td>
320
321
322 <td class="description last"><p>Options for the convert function see js2xmlparser documentation for full details</p></td>
323 </tr>
324
325
326 </tbody>
327</table>
328
329 </td>
330 </tr>
331
332
333 </tbody>
334</table>
335
336
337
338
339
340
341<dl class="details">
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368 <dt class="tag-source">Source:</dt>
369 <dd class="tag-source"><ul class="dummy"><li>
370 <a href="adapters_xml_content.js.html">adapters/xml_content.js</a>, <a href="adapters_xml_content.js.html#line38">line 38</a>
371 </li></ul></dd>
372
373
374
375
376
377
378
379</dl>
380
381
382
383
384
385
386
387
388
389
390
391
392
393<h5>Returns:</h5>
394
395
396<div class="param-desc">
397 <p>Returns the rendered XML string or the err argument if options.skip_conversion is true</p>
398</div>
399
400
401
402<dl>
403 <dt>
404 Type
405 </dt>
406 <dd>
407
408<span class="param-type">string</span>
409
410
411 </dd>
412</dl>
413
414
415
416
417
418
419
420
421
422
423 <h4 class="name" id="_ERROR"><span class="type-signature"></span>_ERROR<span class="signature">(err, options)</span><span class="type-signature"> &rarr; {Object}</span></h4>
424
425
426
427
428
429<div class="description">
430 <p>Creates a formatted error response object</p>
431</div>
432
433
434
435
436
437
438
439
440
441 <h5>Parameters:</h5>
442
443
444<table class="params">
445 <thead>
446 <tr>
447
448 <th>Name</th>
449
450
451 <th>Type</th>
452
453
454
455
456
457 <th class="last">Description</th>
458 </tr>
459 </thead>
460
461 <tbody>
462
463
464 <tr>
465
466 <td class="name"><code>err</code></td>
467
468
469 <td class="type">
470
471
472<span class="param-type">*</span>
473
474
475
476 </td>
477
478
479
480
481
482 <td class="description last"><p>Any data to be sent as part of error response</p></td>
483 </tr>
484
485
486
487 <tr>
488
489 <td class="name"><code>options</code></td>
490
491
492 <td class="type">
493
494
495<span class="param-type">Object</span>
496
497
498
499 </td>
500
501
502
503
504
505 <td class="description last"><p>Configurable options for error response formatting</p>
506 <h6>Properties</h6>
507
508
509<table class="params">
510 <thead>
511 <tr>
512
513 <th>Name</th>
514
515
516 <th>Type</th>
517
518
519 <th>Attributes</th>
520
521
522
523 <th>Default</th>
524
525
526 <th class="last">Description</th>
527 </tr>
528 </thead>
529
530 <tbody>
531
532
533 <tr>
534
535 <td class="name"><code>formatError</code></td>
536
537
538 <td class="type">
539
540
541<span class="param-type">function</span>
542
543
544
545 </td>
546
547
548 <td class="attributes">
549
550 &lt;optional><br>
551
552
553
554
555
556 </td>
557
558
559
560 <td class="default">
561
562 this.formatError
563
564 </td>
565
566
567 <td class="description last"><p>Custom formatting function for json error response. This argument will be ignored if not a function</p></td>
568 </tr>
569
570
571 </tbody>
572</table>
573
574 </td>
575 </tr>
576
577
578 </tbody>
579</table>
580
581
582
583
584
585
586<dl class="details">
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613 <dt class="tag-source">Source:</dt>
614 <dd class="tag-source"><ul class="dummy"><li>
615 <a href="adapters_json_content.js.html">adapters/json_content.js</a>, <a href="adapters_json_content.js.html#line29">line 29</a>
616 </li></ul></dd>
617
618
619
620
621
622
623
624</dl>
625
626
627
628
629
630
631
632
633
634
635
636
637
638<h5>Returns:</h5>
639
640
641<div class="param-desc">
642 <p>Formatted error response object</p>
643</div>
644
645
646
647<dl>
648 <dt>
649 Type
650 </dt>
651 <dd>
652
653<span class="param-type">Object</span>
654
655
656 </dd>
657</dl>
658
659
660
661
662
663
664
665
666
667
668 <h4 class="name" id="_ERROR"><span class="type-signature"></span>_ERROR<span class="signature">(err, options, cb)</span><span class="type-signature"></span></h4>
669
670
671
672
673
674<div class="description">
675 <p>Renders an HTML error page template</p>
676</div>
677
678
679
680
681
682
683
684
685
686 <h5>Parameters:</h5>
687
688
689<table class="params">
690 <thead>
691 <tr>
692
693 <th>Name</th>
694
695
696 <th>Type</th>
697
698
699
700
701
702 <th class="last">Description</th>
703 </tr>
704 </thead>
705
706 <tbody>
707
708
709 <tr>
710
711 <td class="name"><code>err</code></td>
712
713
714 <td class="type">
715
716
717<span class="param-type">Object</span>
718
719
720
721 </td>
722
723
724
725
726
727 <td class="description last"><p>If err is an instanceof Error or has a .message property only the error message will be included</p></td>
728 </tr>
729
730
731
732 <tr>
733
734 <td class="name"><code>options</code></td>
735
736
737 <td class="type">
738
739
740<span class="param-type">Object</span>
741
742
743
744 </td>
745
746
747
748
749
750 <td class="description last"><p>Configurable options for error template rendering see _RENDER for further details on options</p>
751 <h6>Properties</h6>
752
753
754<table class="params">
755 <thead>
756 <tr>
757
758 <th>Name</th>
759
760
761 <th>Type</th>
762
763
764 <th>Attributes</th>
765
766
767
768 <th>Default</th>
769
770
771 <th class="last">Description</th>
772 </tr>
773 </thead>
774
775 <tbody>
776
777
778 <tr>
779
780 <td class="name"><code>viewname</code></td>
781
782
783 <td class="type">
784
785
786<span class="param-type">string</span>
787
788
789
790 </td>
791
792
793 <td class="attributes">
794
795 &lt;optional><br>
796
797
798
799
800
801 </td>
802
803
804
805 <td class="default">
806
807 "home/error404"
808
809 </td>
810
811
812 <td class="description last"><p>Overrideable view name for the error template</p></td>
813 </tr>
814
815
816 </tbody>
817</table>
818
819 </td>
820 </tr>
821
822
823
824 <tr>
825
826 <td class="name"><code>cb</code></td>
827
828
829 <td class="type">
830
831
832<span class="param-type">function</span>
833
834
835
836 </td>
837
838
839
840
841
842 <td class="description last"><p>Callback function</p></td>
843 </tr>
844
845
846 </tbody>
847</table>
848
849
850
851
852
853
854<dl class="details">
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881 <dt class="tag-source">Source:</dt>
882 <dd class="tag-source"><ul class="dummy"><li>
883 <a href="adapters_html_content.js.html">adapters/html_content.js</a>, <a href="adapters_html_content.js.html#line74">line 74</a>
884 </li></ul></dd>
885
886
887
888
889
890
891
892</dl>
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914 <h4 class="name" id="_RENDER"><span class="type-signature"></span>_RENDER<span class="signature">(data, options)</span><span class="type-signature"> &rarr; {string}</span></h4>
915
916
917
918
919
920<div class="description">
921 <p>Creates a formatted success message and converts to XML</p>
922</div>
923
924
925
926
927
928
929
930
931
932 <h5>Parameters:</h5>
933
934
935<table class="params">
936 <thead>
937 <tr>
938
939 <th>Name</th>
940
941
942 <th>Type</th>
943
944
945
946
947
948 <th class="last">Description</th>
949 </tr>
950 </thead>
951
952 <tbody>
953
954
955 <tr>
956
957 <td class="name"><code>data</code></td>
958
959
960 <td class="type">
961
962
963<span class="param-type">*</span>
964
965
966
967 </td>
968
969
970
971
972
973 <td class="description last"><p>Any data to be included in XML response</p></td>
974 </tr>
975
976
977
978 <tr>
979
980 <td class="name"><code>options</code></td>
981
982
983 <td class="type">
984
985
986<span class="param-type">Object</span>
987
988
989
990 </td>
991
992
993
994
995
996 <td class="description last"><p>Configurable options for XML response generation</p>
997 <h6>Properties</h6>
998
999
1000<table class="params">
1001 <thead>
1002 <tr>
1003
1004 <th>Name</th>
1005
1006
1007 <th>Type</th>
1008
1009
1010 <th>Attributes</th>
1011
1012
1013
1014 <th>Default</th>
1015
1016
1017 <th class="last">Description</th>
1018 </tr>
1019 </thead>
1020
1021 <tbody>
1022
1023
1024 <tr>
1025
1026 <td class="name"><code>skip_conversion</code></td>
1027
1028
1029 <td class="type">
1030
1031
1032<span class="param-type">Boolean</span>
1033
1034
1035
1036 </td>
1037
1038
1039 <td class="attributes">
1040
1041 &lt;optional><br>
1042
1043
1044
1045
1046
1047 </td>
1048
1049
1050
1051 <td class="default">
1052
1053 this.skip_conversion
1054
1055 </td>
1056
1057
1058 <td class="description last"><p>If true rendering is skipped and the data argument is immediately returned</p></td>
1059 </tr>
1060
1061
1062
1063 <tr>
1064
1065 <td class="name"><code>xml_root</code></td>
1066
1067
1068 <td class="type">
1069
1070
1071<span class="param-type">string</span>
1072
1073
1074
1075 </td>
1076
1077
1078 <td class="attributes">
1079
1080 &lt;optional><br>
1081
1082
1083
1084
1085
1086 </td>
1087
1088
1089
1090 <td class="default">
1091
1092 this.xml_root
1093
1094 </td>
1095
1096
1097 <td class="description last"><p>Defines the value of the XML document root tag. If this.xml_root is not set and options.xml_root is not provided a TypeError will be thrown</p></td>
1098 </tr>
1099
1100
1101
1102 <tr>
1103
1104 <td class="name"><code>xml_configuration</code></td>
1105
1106
1107 <td class="type">
1108
1109
1110<span class="param-type">Object</span>
1111
1112
1113
1114 </td>
1115
1116
1117 <td class="attributes">
1118
1119 &lt;optional><br>
1120
1121
1122
1123
1124
1125 </td>
1126
1127
1128
1129 <td class="default">
1130
1131 this.xml_configuration
1132
1133 </td>
1134
1135
1136 <td class="description last"><p>Options for the convert function see js2xmlparser documentation for full details</p></td>
1137 </tr>
1138
1139
1140 </tbody>
1141</table>
1142
1143 </td>
1144 </tr>
1145
1146
1147 </tbody>
1148</table>
1149
1150
1151
1152
1153
1154
1155<dl class="details">
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182 <dt class="tag-source">Source:</dt>
1183 <dd class="tag-source"><ul class="dummy"><li>
1184 <a href="adapters_xml_content.js.html">adapters/xml_content.js</a>, <a href="adapters_xml_content.js.html#line15">line 15</a>
1185 </li></ul></dd>
1186
1187
1188
1189
1190
1191
1192
1193</dl>
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207<h5>Returns:</h5>
1208
1209
1210<div class="param-desc">
1211 <p>Returns the rendered XML string or the data argument if options.skip_conversion is true</p>
1212</div>
1213
1214
1215
1216<dl>
1217 <dt>
1218 Type
1219 </dt>
1220 <dd>
1221
1222<span class="param-type">string</span>
1223
1224
1225 </dd>
1226</dl>
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237 <h4 class="name" id="_RENDER"><span class="type-signature"></span>_RENDER<span class="signature">(data, options)</span><span class="type-signature"> &rarr; {Object}</span></h4>
1238
1239
1240
1241
1242
1243<div class="description">
1244 <p>Creates a formatted success response object</p>
1245</div>
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255 <h5>Parameters:</h5>
1256
1257
1258<table class="params">
1259 <thead>
1260 <tr>
1261
1262 <th>Name</th>
1263
1264
1265 <th>Type</th>
1266
1267
1268
1269
1270
1271 <th class="last">Description</th>
1272 </tr>
1273 </thead>
1274
1275 <tbody>
1276
1277
1278 <tr>
1279
1280 <td class="name"><code>data</code></td>
1281
1282
1283 <td class="type">
1284
1285
1286<span class="param-type">*</span>
1287
1288
1289
1290 </td>
1291
1292
1293
1294
1295
1296 <td class="description last"><p>Any data that should be sent with the success response</p></td>
1297 </tr>
1298
1299
1300
1301 <tr>
1302
1303 <td class="name"><code>options</code></td>
1304
1305
1306 <td class="type">
1307
1308
1309<span class="param-type">Object</span>
1310
1311
1312
1313 </td>
1314
1315
1316
1317
1318
1319 <td class="description last"><p>Configurable options for success response formatting</p>
1320 <h6>Properties</h6>
1321
1322
1323<table class="params">
1324 <thead>
1325 <tr>
1326
1327 <th>Name</th>
1328
1329
1330 <th>Type</th>
1331
1332
1333 <th>Attributes</th>
1334
1335
1336
1337 <th>Default</th>
1338
1339
1340 <th class="last">Description</th>
1341 </tr>
1342 </thead>
1343
1344 <tbody>
1345
1346
1347 <tr>
1348
1349 <td class="name"><code>formatRender</code></td>
1350
1351
1352 <td class="type">
1353
1354
1355<span class="param-type">function</span>
1356
1357
1358
1359 </td>
1360
1361
1362 <td class="attributes">
1363
1364 &lt;optional><br>
1365
1366
1367
1368
1369
1370 </td>
1371
1372
1373
1374 <td class="default">
1375
1376 this.formatRender
1377
1378 </td>
1379
1380
1381 <td class="description last"><p>Custom formatting function for json success response. This argument will be ignored if not a function</p></td>
1382 </tr>
1383
1384
1385 </tbody>
1386</table>
1387
1388 </td>
1389 </tr>
1390
1391
1392 </tbody>
1393</table>
1394
1395
1396
1397
1398
1399
1400<dl class="details">
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427 <dt class="tag-source">Source:</dt>
1428 <dd class="tag-source"><ul class="dummy"><li>
1429 <a href="adapters_json_content.js.html">adapters/json_content.js</a>, <a href="adapters_json_content.js.html#line11">line 11</a>
1430 </li></ul></dd>
1431
1432
1433
1434
1435
1436
1437
1438</dl>
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452<h5>Returns:</h5>
1453
1454
1455<div class="param-desc">
1456 <p>Formatted success response object</p>
1457</div>
1458
1459
1460
1461<dl>
1462 <dt>
1463 Type
1464 </dt>
1465 <dd>
1466
1467<span class="param-type">Object</span>
1468
1469
1470 </dd>
1471</dl>
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482 <h4 class="name" id="_RENDER"><span class="type-signature"></span>_RENDER<span class="signature">(data, options, cb)</span><span class="type-signature"></span></h4>
1483
1484
1485
1486
1487
1488<div class="description">
1489 <p>Renders an HTML string from provided data</p>
1490</div>
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500 <h5>Parameters:</h5>
1501
1502
1503<table class="params">
1504 <thead>
1505 <tr>
1506
1507 <th>Name</th>
1508
1509
1510 <th>Type</th>
1511
1512
1513
1514
1515
1516 <th class="last">Description</th>
1517 </tr>
1518 </thead>
1519
1520 <tbody>
1521
1522
1523 <tr>
1524
1525 <td class="name"><code>data</code></td>
1526
1527
1528 <td class="type">
1529
1530
1531<span class="param-type">Object</span>
1532
1533
1534
1535 </td>
1536
1537
1538
1539
1540
1541 <td class="description last"><p>Template data should conform to EJS template by default or custom templating engine</p></td>
1542 </tr>
1543
1544
1545
1546 <tr>
1547
1548 <td class="name"><code>options</code></td>
1549
1550
1551 <td class="type">
1552
1553
1554<span class="param-type">Object</span>
1555
1556
1557
1558 </td>
1559
1560
1561
1562
1563
1564 <td class="description last"><p>Configurable options for the rendering of HTML string</p>
1565 <h6>Properties</h6>
1566
1567
1568<table class="params">
1569 <thead>
1570 <tr>
1571
1572 <th>Name</th>
1573
1574
1575 <th>Type</th>
1576
1577
1578 <th>Attributes</th>
1579
1580
1581
1582 <th>Default</th>
1583
1584
1585 <th class="last">Description</th>
1586 </tr>
1587 </thead>
1588
1589 <tbody>
1590
1591
1592 <tr>
1593
1594 <td class="name"><code>themename</code></td>
1595
1596
1597 <td class="type">
1598
1599
1600<span class="param-type">string</span>
1601
1602
1603
1604 </td>
1605
1606
1607 <td class="attributes">
1608
1609 &lt;optional><br>
1610
1611
1612
1613
1614
1615 </td>
1616
1617
1618
1619 <td class="default">
1620
1621 this.themename
1622
1623 </td>
1624
1625
1626 <td class="description last"><p>Specifies a periodic theme folder that will be checked when looking for a matching template</p></td>
1627 </tr>
1628
1629
1630
1631 <tr>
1632
1633 <td class="name"><code>viewname</code></td>
1634
1635
1636 <td class="type">
1637
1638
1639<span class="param-type">string</span>
1640
1641
1642
1643 </td>
1644
1645
1646 <td class="attributes">
1647
1648 &lt;optional><br>
1649
1650
1651
1652
1653
1654 </td>
1655
1656
1657
1658 <td class="default">
1659
1660 this.viewname
1661
1662 </td>
1663
1664
1665 <td class="description last"><p>Specifies the filename of the template</p></td>
1666 </tr>
1667
1668
1669
1670 <tr>
1671
1672 <td class="name"><code>extname</code></td>
1673
1674
1675 <td class="type">
1676
1677
1678<span class="param-type">string</span>
1679
1680
1681
1682 </td>
1683
1684
1685 <td class="attributes">
1686
1687 &lt;optional><br>
1688
1689
1690
1691
1692
1693 </td>
1694
1695
1696
1697 <td class="default">
1698
1699 this.extname
1700
1701 </td>
1702
1703
1704 <td class="description last"><p>Specifies a periodicjs extension folder that should be checked when looking for a matching template</p></td>
1705 </tr>
1706
1707
1708
1709 <tr>
1710
1711 <td class="name"><code>resolve_filepath</code></td>
1712
1713
1714 <td class="type">
1715
1716
1717<span class="param-type">Boolean</span>
1718
1719
1720
1721 </td>
1722
1723
1724 <td class="attributes">
1725
1726 &lt;optional><br>
1727
1728
1729
1730
1731
1732 </td>
1733
1734
1735
1736 <td class="default">
1737
1738 </td>
1739
1740
1741 <td class="description last"><p>If true a valid file path will be returned and rendering of the template file will be skipped</p></td>
1742 </tr>
1743
1744
1745
1746 <tr>
1747
1748 <td class="name"><code>fileext</code></td>
1749
1750
1751 <td class="type">
1752
1753
1754<span class="param-type">string</span>
1755
1756
1757
1758 </td>
1759
1760
1761 <td class="attributes">
1762
1763 &lt;optional><br>
1764
1765
1766
1767
1768
1769 </td>
1770
1771
1772
1773 <td class="default">
1774
1775 this.fileext
1776
1777 </td>
1778
1779
1780 <td class="description last"><p>Specifies the extension name of the template file</p></td>
1781 </tr>
1782
1783
1784
1785 <tr>
1786
1787 <td class="name"><code>dirname</code></td>
1788
1789
1790 <td class="type">
1791
1792
1793<span class="param-type">string</span>
1794|
1795
1796<span class="param-type">Array.&lt;string></span>
1797
1798
1799
1800 </td>
1801
1802
1803 <td class="attributes">
1804
1805 &lt;optional><br>
1806
1807
1808
1809
1810
1811 </td>
1812
1813
1814
1815 <td class="default">
1816
1817 </td>
1818
1819
1820 <td class="description last"><p>Optional custom directories to be checked for template</p></td>
1821 </tr>
1822
1823
1824
1825 <tr>
1826
1827 <td class="name"><code>engine_configuration</code></td>
1828
1829
1830 <td class="type">
1831
1832
1833<span class="param-type">Object</span>
1834
1835
1836
1837 </td>
1838
1839
1840 <td class="attributes">
1841
1842 &lt;optional><br>
1843
1844
1845
1846
1847
1848 </td>
1849
1850
1851
1852 <td class="default">
1853
1854 this.engine_configuration
1855
1856 </td>
1857
1858
1859 <td class="description last"><p>Custom configuration object for whichever templating engine being used see EJS documentation for details on options for EJS</p></td>
1860 </tr>
1861
1862
1863 </tbody>
1864</table>
1865
1866 </td>
1867 </tr>
1868
1869
1870
1871 <tr>
1872
1873 <td class="name"><code>cb</code></td>
1874
1875
1876 <td class="type">
1877
1878
1879<span class="param-type">function</span>
1880
1881
1882
1883 </td>
1884
1885
1886
1887
1888
1889 <td class="description last"><p>Callback function</p></td>
1890 </tr>
1891
1892
1893 </tbody>
1894</table>
1895
1896
1897
1898
1899
1900
1901<dl class="details">
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928 <dt class="tag-source">Source:</dt>
1929 <dd class="tag-source"><ul class="dummy"><li>
1930 <a href="adapters_html_content.js.html">adapters/html_content.js</a>, <a href="adapters_html_content.js.html#line38">line 38</a>
1931 </li></ul></dd>
1932
1933
1934
1935
1936
1937
1938
1939</dl>
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961 <h4 class="name" id="findValidViewFromPaths"><span class="type-signature"></span>findValidViewFromPaths<span class="signature">(_default, dirs<span class="signature-attributes">opt</span>)</span><span class="type-signature"> &rarr; {Object}</span></h4>
1962
1963
1964
1965
1966
1967<div class="description">
1968 <p>Iterates through an array of file paths resolving after it finds a valid path or resolves with the default value</p>
1969</div>
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979 <h5>Parameters:</h5>
1980
1981
1982<table class="params">
1983 <thead>
1984 <tr>
1985
1986 <th>Name</th>
1987
1988
1989 <th>Type</th>
1990
1991
1992 <th>Attributes</th>
1993
1994
1995
1996 <th>Default</th>
1997
1998
1999 <th class="last">Description</th>
2000 </tr>
2001 </thead>
2002
2003 <tbody>
2004
2005
2006 <tr>
2007
2008 <td class="name"><code>_default</code></td>
2009
2010
2011 <td class="type">
2012
2013
2014<span class="param-type">string</span>
2015
2016
2017
2018 </td>
2019
2020
2021 <td class="attributes">
2022
2023
2024
2025
2026
2027 </td>
2028
2029
2030
2031 <td class="default">
2032
2033 </td>
2034
2035
2036 <td class="description last"><p>A default value to resolve if no provided file path is valid</p></td>
2037 </tr>
2038
2039
2040
2041 <tr>
2042
2043 <td class="name"><code>dirs</code></td>
2044
2045
2046 <td class="type">
2047
2048
2049<span class="param-type">Array.&lt;string></span>
2050
2051
2052
2053 </td>
2054
2055
2056 <td class="attributes">
2057
2058 &lt;optional><br>
2059
2060
2061
2062
2063
2064 </td>
2065
2066
2067
2068 <td class="default">
2069
2070 []
2071
2072 </td>
2073
2074
2075 <td class="description last"><p>File paths to check for validity (file exists)</p></td>
2076 </tr>
2077
2078
2079 </tbody>
2080</table>
2081
2082
2083
2084
2085
2086
2087<dl class="details">
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114 <dt class="tag-source">Source:</dt>
2115 <dd class="tag-source"><ul class="dummy"><li>
2116 <a href="adapters_html_content.js.html">adapters/html_content.js</a>, <a href="adapters_html_content.js.html#line14">line 14</a>
2117 </li></ul></dd>
2118
2119
2120
2121
2122
2123
2124
2125</dl>
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139<h5>Returns:</h5>
2140
2141
2142<div class="param-desc">
2143 <p>Returns a Promise which resolves with a file path or the default value</p>
2144</div>
2145
2146
2147
2148<dl>
2149 <dt>
2150 Type
2151 </dt>
2152 <dd>
2153
2154<span class="param-type">Object</span>
2155
2156
2157 </dd>
2158</dl>
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170</article>
2171
2172</section>
2173
2174
2175
2176
2177</div>
2178
2179<nav>
2180 <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="CONTENT_ADAPTER_INTERFACE.html">CONTENT_ADAPTER_INTERFACE</a></li><li><a href="HTML_ADAPTER.html">HTML_ADAPTER</a></li><li><a href="JSON_ADAPTER.html">JSON_ADAPTER</a></li><li><a href="XML_ADAPTER.html">XML_ADAPTER</a></li></ul><h3>Global</h3><ul><li><a href="global.html#_ERROR">_ERROR</a></li><li><a href="global.html#_RENDER">_RENDER</a></li><li><a href="global.html#findValidViewFromPaths">findValidViewFromPaths</a></li></ul>
2181</nav>
2182
2183<br class="clear">
2184
2185<footer>
2186 Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.4.3</a> on Thu Dec 22 2016 14:40:43 GMT-0500 (EST)
2187</footer>
2188
2189<script> prettyPrint(); </script>
2190<script src="scripts/linenumber.js"> </script>
2191</body>
2192</html>
\No newline at end of file