UNPKG

14.8 kBHTMLView Raw
1<!DOCTYPE html>
2
3<html lang="en">
4<head>
5 <meta charset="utf-8">
6 <meta name="viewport" content="width=device-width">
7 <title>Documentation Namespace: helpers</title>
8
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/sunlight.default.css">
13
14 <link type="text/css" rel="stylesheet" href="styles/site.simplex.css">
15
16</head>
17
18<body>
19
20<div class="navbar navbar-default navbar-fixed-top ">
21<div class="container">
22 <div class="navbar-header">
23 <a class="navbar-brand" href="index.html">Documentation</a>
24 <button class="navbar-toggle" type="button" data-toggle="collapse" data-target="#topNavigation">
25 <span class="icon-bar"></span>
26 <span class="icon-bar"></span>
27 <span class="icon-bar"></span>
28 </button>
29 </div>
30 <div class="navbar-collapse collapse" id="topNavigation">
31 <ul class="nav navbar-nav">
32
33 <li class="dropdown">
34 <a href="namespaces.list.html" class="dropdown-toggle" data-toggle="dropdown">Namespaces<b class="caret"></b></a>
35 <ul class="dropdown-menu ">
36 <li><a href="faker.html">faker</a></li><li><a href="faker.address.html">faker.address</a></li><li><a href="faker.commerce.html">faker.commerce</a></li><li><a href="faker.company.html">faker.company</a></li><li><a href="faker.date.html">faker.date</a></li><li><a href="faker.finance.html">faker.finance</a></li><li><a href="faker.hacker.html">faker.hacker</a></li><li><a href="faker.helpers.html">faker.helpers</a></li><li><a href="faker.image.html">faker.image</a></li><li><a href="faker.internet.html">faker.internet</a></li><li><a href="faker.lorem.html">faker.lorem</a></li><li><a href="faker.name.html">faker.name</a></li><li><a href="faker.phone.html">faker.phone</a></li><li><a href="faker.random.html">faker.random</a></li><li><a href="faker.system.html">faker.system</a></li>
37 </ul>
38 </li>
39
40 </ul>
41 <div class="col-sm-3 col-md-3">
42 <form class="navbar-form" role="search">
43 <div class="input-group">
44 <input type="text" class="form-control" placeholder="Search" name="q" id="search-input">
45 <div class="input-group-btn">
46 <button class="btn btn-default" id="search-submit"><i class="glyphicon glyphicon-search"></i></button>
47 </div>
48 </div>
49 </form>
50 </div>
51 </div>
52
53</div>
54</div>
55
56
57<div class="container" id="toc-content">
58<div class="row">
59
60
61 <div class="col-md-8">
62
63 <div id="main">
64
65
66 <h1 class="page-title">Namespace: helpers</h1>
67<section>
68
69<header>
70
71 <h2>
72 <span class="ancestors"><a href="faker.html">faker</a>.</span>
73
74 helpers
75 </h2>
76
77
78</header>
79
80
81<article>
82 <div class="container-overview">
83
84
85
86
87<dl class="details">
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</dl>
124
125
126
127
128 </div>
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143 <h3 class="subsection-title">Methods</h3>
144
145 <dl>
146
147<hr>
148<dt>
149 <h4 class="name" id=".contextualCard"><span class="type-signature">&lt;static> </span>contextualCard()</h4>
150
151
152</dt>
153<dd>
154
155
156 <div class="description">
157 <p>contextualCard</p>
158 </div>
159
160
161
162
163
164
165
166
167
168
169<dl class="details">
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</dl>
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221</dd>
222
223
224
225<hr>
226<dt>
227 <h4 class="name" id=".createCard"><span class="type-signature">&lt;static> </span>createCard()</h4>
228
229
230</dt>
231<dd>
232
233
234 <div class="description">
235 <p>createCard</p>
236 </div>
237
238
239
240
241
242
243
244
245
246
247<dl class="details">
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</dl>
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299</dd>
300
301
302
303<hr>
304<dt>
305 <h4 class="name" id=".createTransaction"><span class="type-signature">&lt;static> </span>createTransaction()</h4>
306
307
308</dt>
309<dd>
310
311
312 <div class="description">
313 <p>createTransaction</p>
314 </div>
315
316
317
318
319
320
321
322
323
324
325<dl class="details">
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361</dl>
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377</dd>
378
379
380
381<hr>
382<dt>
383 <h4 class="name" id=".mustache"><span class="type-signature">&lt;static> </span>mustache(str, data)</h4>
384
385
386</dt>
387<dd>
388
389
390 <div class="description">
391 <p>mustache</p>
392 </div>
393
394
395
396
397
398
399
400
401 <h5>Parameters:</h5>
402
403
404<table class="params table table-striped">
405 <thead>
406 <tr>
407
408 <th>Name</th>
409
410
411 <th>Type</th>
412
413
414
415
416
417 <th class="last">Description</th>
418 </tr>
419 </thead>
420
421 <tbody>
422
423
424 <tr>
425
426 <td class="name"><code>str</code></td>
427
428
429 <td class="type">
430
431
432<span class="param-type">string</span>
433
434
435
436
437 </td>
438
439
440
441
442
443 <td class="description last"></td>
444 </tr>
445
446
447
448 <tr>
449
450 <td class="name"><code>data</code></td>
451
452
453 <td class="type">
454
455
456<span class="param-type">object</span>
457
458
459
460
461 </td>
462
463
464
465
466
467 <td class="description last"></td>
468 </tr>
469
470
471 </tbody>
472</table>
473
474
475
476
477<dl class="details">
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513</dl>
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529</dd>
530
531
532
533<hr>
534<dt>
535 <h4 class="name" id=".randomize"><span class="type-signature">&lt;static> </span>randomize(array)</h4>
536
537
538</dt>
539<dd>
540
541
542 <div class="description">
543 <p>backword-compatibility</p>
544 </div>
545
546
547
548
549
550
551
552
553 <h5>Parameters:</h5>
554
555
556<table class="params table table-striped">
557 <thead>
558 <tr>
559
560 <th>Name</th>
561
562
563 <th>Type</th>
564
565
566
567
568
569 <th class="last">Description</th>
570 </tr>
571 </thead>
572
573 <tbody>
574
575
576 <tr>
577
578 <td class="name"><code>array</code></td>
579
580
581 <td class="type">
582
583
584<span class="param-type">array</span>
585
586
587
588
589 </td>
590
591
592
593
594
595 <td class="description last"></td>
596 </tr>
597
598
599 </tbody>
600</table>
601
602
603
604
605<dl class="details">
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641</dl>
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657</dd>
658
659
660
661<hr>
662<dt>
663 <h4 class="name" id=".replaceSymbols"><span class="type-signature">&lt;static> </span>replaceSymbols(string)</h4>
664
665
666</dt>
667<dd>
668
669
670 <div class="description">
671 <p>parses string for symbols (numbers or letters) and replaces them appropriately</p>
672 </div>
673
674
675
676
677
678
679
680
681 <h5>Parameters:</h5>
682
683
684<table class="params table table-striped">
685 <thead>
686 <tr>
687
688 <th>Name</th>
689
690
691 <th>Type</th>
692
693
694
695
696
697 <th class="last">Description</th>
698 </tr>
699 </thead>
700
701 <tbody>
702
703
704 <tr>
705
706 <td class="name"><code>string</code></td>
707
708
709 <td class="type">
710
711
712<span class="param-type">string</span>
713
714
715
716
717 </td>
718
719
720
721
722
723 <td class="description last"></td>
724 </tr>
725
726
727 </tbody>
728</table>
729
730
731
732
733<dl class="details">
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769</dl>
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785</dd>
786
787
788
789<hr>
790<dt>
791 <h4 class="name" id=".replaceSymbolWithNumber"><span class="type-signature">&lt;static> </span>replaceSymbolWithNumber(string, symbol)</h4>
792
793
794</dt>
795<dd>
796
797
798 <div class="description">
799 <p>parses string for a symbol and replace it with a random number from 1-10</p>
800 </div>
801
802
803
804
805
806
807
808
809 <h5>Parameters:</h5>
810
811
812<table class="params table table-striped">
813 <thead>
814 <tr>
815
816 <th>Name</th>
817
818
819 <th>Type</th>
820
821
822
823
824
825 <th class="last">Description</th>
826 </tr>
827 </thead>
828
829 <tbody>
830
831
832 <tr>
833
834 <td class="name"><code>string</code></td>
835
836
837 <td class="type">
838
839
840<span class="param-type">string</span>
841
842
843
844
845 </td>
846
847
848
849
850
851 <td class="description last"></td>
852 </tr>
853
854
855
856 <tr>
857
858 <td class="name"><code>symbol</code></td>
859
860
861 <td class="type">
862
863
864<span class="param-type">string</span>
865
866
867
868
869 </td>
870
871
872
873
874
875 <td class="description last"><p>defaults to <code>&quot;#&quot;</code></p></td>
876 </tr>
877
878
879 </tbody>
880</table>
881
882
883
884
885<dl class="details">
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921</dl>
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937</dd>
938
939
940
941<hr>
942<dt>
943 <h4 class="name" id=".shuffle"><span class="type-signature">&lt;static> </span>shuffle(o)</h4>
944
945
946</dt>
947<dd>
948
949
950 <div class="description">
951 <p>takes an array and returns it randomized</p>
952 </div>
953
954
955
956
957
958
959
960
961 <h5>Parameters:</h5>
962
963
964<table class="params table table-striped">
965 <thead>
966 <tr>
967
968 <th>Name</th>
969
970
971 <th>Type</th>
972
973
974
975
976
977 <th class="last">Description</th>
978 </tr>
979 </thead>
980
981 <tbody>
982
983
984 <tr>
985
986 <td class="name"><code>o</code></td>
987
988
989 <td class="type">
990
991
992<span class="param-type">array</span>
993
994
995
996
997 </td>
998
999
1000
1001
1002
1003 <td class="description last"></td>
1004 </tr>
1005
1006
1007 </tbody>
1008</table>
1009
1010
1011
1012
1013<dl class="details">
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049</dl>
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065</dd>
1066
1067
1068
1069<hr>
1070<dt>
1071 <h4 class="name" id=".slugify"><span class="type-signature">&lt;static> </span>slugify(string)</h4>
1072
1073
1074</dt>
1075<dd>
1076
1077
1078 <div class="description">
1079 <p>slugifies string</p>
1080 </div>
1081
1082
1083
1084
1085
1086
1087
1088
1089 <h5>Parameters:</h5>
1090
1091
1092<table class="params table table-striped">
1093 <thead>
1094 <tr>
1095
1096 <th>Name</th>
1097
1098
1099 <th>Type</th>
1100
1101
1102
1103
1104
1105 <th class="last">Description</th>
1106 </tr>
1107 </thead>
1108
1109 <tbody>
1110
1111
1112 <tr>
1113
1114 <td class="name"><code>string</code></td>
1115
1116
1117 <td class="type">
1118
1119
1120<span class="param-type">string</span>
1121
1122
1123
1124
1125 </td>
1126
1127
1128
1129
1130
1131 <td class="description last"></td>
1132 </tr>
1133
1134
1135 </tbody>
1136</table>
1137
1138
1139
1140
1141<dl class="details">
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177</dl>
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193</dd>
1194
1195
1196
1197<hr>
1198<dt>
1199 <h4 class="name" id=".userCard"><span class="type-signature">&lt;static> </span>userCard()</h4>
1200
1201
1202</dt>
1203<dd>
1204
1205
1206 <div class="description">
1207 <p>userCard</p>
1208 </div>
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219<dl class="details">
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255</dl>
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271</dd>
1272
1273 </dl>
1274
1275
1276
1277
1278
1279</article>
1280
1281</section>
1282
1283
1284
1285
1286 </div>
1287 </div>
1288
1289 <div class="clearfix"></div>
1290
1291
1292 <div class="col-md-3">
1293 <div id="toc" class="col-md-3 hidden-xs hidden-sm hidden-md"></div>
1294 </div>
1295
1296
1297</div>
1298</div>
1299
1300<div class="modal fade" id="searchResults">
1301 <div class="modal-dialog">
1302 <div class="modal-content">
1303 <div class="modal-header">
1304 <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
1305 <h4 class="modal-title">Search results</h4>
1306 </div>
1307 <div class="modal-body"></div>
1308 <div class="modal-footer">
1309 <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
1310 </div>
1311 </div><!-- /.modal-content -->
1312 </div><!-- /.modal-dialog -->
1313</div>
1314
1315<footer>
1316
1317
1318<span class="jsdoc-message">
1319 Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.4.0</a>
1320
1321 on 2016-03-19T23:15:39-04:00
1322
1323 using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
1324</span>
1325</footer>
1326
1327<script src="scripts/docstrap.lib.js"></script>
1328<script src="scripts/toc.js"></script>
1329<script type="text/javascript" src="scripts/fulltext-search-ui.js"></script>
1330
1331<script>
1332$( function () {
1333 $( "[id*='$']" ).each( function () {
1334 var $this = $( this );
1335
1336 $this.attr( "id", $this.attr( "id" ).replace( "$", "__" ) );
1337 } );
1338
1339 $( ".tutorial-section pre, .readme-section pre" ).each( function () {
1340 var $this = $( this );
1341
1342 var example = $this.find( "code" );
1343 exampleText = example.html();
1344 var lang = /{@lang (.*?)}/.exec( exampleText );
1345 if ( lang && lang[1] ) {
1346 exampleText = exampleText.replace( lang[0], "" );
1347 example.html( exampleText );
1348 lang = lang[1];
1349 } else {
1350 var langClassMatch = example.parent()[0].className.match(/lang\-(\S+)/);
1351 lang = langClassMatch ? langClassMatch[1] : "javascript";
1352 }
1353
1354 if ( lang ) {
1355
1356 $this
1357 .addClass( "sunlight-highlight-" + lang )
1358 .addClass( "linenums" )
1359 .html( example.html() );
1360
1361 }
1362 } );
1363
1364 Sunlight.highlightAll( {
1365 lineNumbers : false,
1366 showMenu : true,
1367 enableDoclinks : true
1368 } );
1369
1370 $.catchAnchorLinks( {
1371 navbarOffset: 10
1372 } );
1373 $( "#toc" ).toc( {
1374 anchorName : function ( i, heading, prefix ) {
1375 var id = $( heading ).attr( "id" );
1376 return id && id.replace(/\~/g, '-inner-').replace(/\./g, '-static-') || ( prefix + i );
1377 },
1378 selectors : "#toc-content h1,#toc-content h2,#toc-content h3,#toc-content h4",
1379 showAndHide : false,
1380 smoothScrolling: true
1381 } );
1382
1383 $( "#main span[id^='toc']" ).addClass( "toc-shim" );
1384 $( '.dropdown-toggle' ).dropdown();
1385
1386 $( "table" ).each( function () {
1387 var $this = $( this );
1388 $this.addClass('table');
1389 } );
1390
1391} );
1392</script>
1393
1394
1395
1396<!--Navigation and Symbol Display-->
1397
1398
1399<!--Google Analytics-->
1400
1401
1402<script type="text/javascript">
1403 $(document).ready(function() {
1404 SearcherDisplay.init();
1405 });
1406</script>
1407
1408</body>
1409</html>
\No newline at end of file