How to use ify method in Appium

Best JavaScript code snippet using appium

gun.ext.js

Source:gun.ext.js Github

copy

Full Screen

1/**********************************************************************2 * Extern for Gun3 * Generated by http://jmmk.github.io/javascript-externs-generator4 **********************************************************************/5var Gun = {6 "is": function () {},7 "version": {},8 "chain": {9 "toJSON": function () {},10 "opt": function () {},11 "back": function () {},12 "chain": {13 "input": function () {}14 },15 "get": function () {},16 "put": function () {},17 "key": function () {},18 "path": function () {},19 "on": function () {},20 "val": function () {},21 "off": function () {},22 "not": function () {},23 "map": function () {},24 "init": function () {},25 "set": function () {}26 },27 "fn": {28 "is": function () {}29 },30 "fns": {31 "is": function () {}32 },33 "bi": {34 "is": function () {}35 },36 "num": {37 "is": function () {}38 },39 "text": {40 "is": function () {},41 "ify": function () {},42 "random": function () {},43 "match": function () {}44 },45 "list": {46 "is": function () {},47 "slit": function () {},48 "sort": function () {},49 "map": function () {},50 "index": {}51 },52 "obj": {53 "is": function () {},54 "put": function () {},55 "has": function () {},56 "del": function () {},57 "as": function () {},58 "ify": function () {},59 "to": function () {},60 "copy": function () {},61 "empty": function () {},62 "map": function () {}63 },64 "time": {65 "is": function () {}66 },67 "HAM": {68 "union": function () {},69 "delta": function () {},70 "synth": function () {}71 },72 "val": {73 "is": function () {},74 "rel": {75 "_": {},76 "is": function () {},77 "ify": function () {}78 }79 },80 "node": {81 "_": {},82 "soul": {83 "ify": function () {}84 },85 "is": function () {},86 "ify": function () {}87 },88 "state": {89 "_": {},90 "ify": function () {},91 "is": function () {},92 "map": function () {}93 },94 "graph": {95 "is": function () {},96 "ify": function () {},97 "node": function () {},98 "to": function () {}99 },100 "dup": function () {},101 "on": {102 "stun": function () {},103 "ask": {104 "on": function () {}105 },106 "ack": function () {},107 "_": {108 "next": function () {}109 },110 "off": function () {}111 },112 "_": {113 "node": {},114 "soul": {},115 "state": {},116 "field": {},117 "value": {}118 },119 "create": function () {},120 "log": {121 "once": {122 "welcome": {}123 }124 },125 "tag": {126 "next": {127 "tag": {},128 "to": {129 "off": function () {},130 "to": {131 "next": function () {}132 },133 "next": function () {},134 "the": {},135 "on": {136 "is": function () {},137 "version": {},138 "chain": {139 "toJSON": function () {},140 "opt": function () {},141 "back": function () {},142 "chain": {143 "input": function () {}144 },145 "get": function () {},146 "put": function () {},147 "key": function () {},148 "path": function () {},149 "on": function () {},150 "val": function () {},151 "off": function () {},152 "not": function () {},153 "map": function () {},154 "init": function () {},155 "set": function () {}156 },157 "fn": {158 "is": function () {}159 },160 "fns": {161 "is": function () {}162 },163 "bi": {164 "is": function () {}165 },166 "num": {167 "is": function () {}168 },169 "text": {170 "is": function () {},171 "ify": function () {},172 "random": function () {},173 "match": function () {}174 },175 "list": {176 "is": function () {},177 "slit": function () {},178 "sort": function () {},179 "map": function () {},180 "index": {}181 },182 "obj": {183 "is": function () {},184 "put": function () {},185 "has": function () {},186 "del": function () {},187 "as": function () {},188 "ify": function () {},189 "to": function () {},190 "copy": function () {},191 "empty": function () {},192 "map": function () {}193 },194 "time": {195 "is": function () {}196 },197 "HAM": {198 "union": function () {},199 "delta": function () {},200 "synth": function () {}201 },202 "val": {203 "is": function () {},204 "rel": {205 "_": {},206 "is": function () {},207 "ify": function () {}208 }209 },210 "node": {211 "_": {},212 "soul": {213 "ify": function () {}214 },215 "is": function () {},216 "ify": function () {}217 },218 "state": {219 "_": {},220 "ify": function () {},221 "is": function () {},222 "map": function () {}223 },224 "graph": {225 "is": function () {},226 "ify": function () {},227 "node": function () {},228 "to": function () {}229 },230 "dup": function () {},231 "on": {232 "stun": function () {},233 "ask": {234 "on": function () {}235 },236 "ack": function () {},237 "_": {238 "next": function () {}239 },240 "off": function () {}241 },242 "_": {243 "node": {},244 "soul": {},245 "state": {},246 "field": {},247 "value": {}248 },249 "create": function () {},250 "log": {251 "once": {252 "welcome": {}253 }254 },255 "tag": {}256 },257 "as": {},258 "back": {}259 },260 "last": {261 "off": function () {},262 "to": {263 "next": function () {}264 },265 "next": function () {},266 "the": {},267 "on": {268 "is": function () {},269 "version": {},270 "chain": {271 "toJSON": function () {},272 "opt": function () {},273 "back": function () {},274 "chain": {275 "input": function () {}276 },277 "get": function () {},278 "put": function () {},279 "key": function () {},280 "path": function () {},281 "on": function () {},282 "val": function () {},283 "off": function () {},284 "not": function () {},285 "map": function () {},286 "init": function () {},287 "set": function () {}288 },289 "fn": {290 "is": function () {}291 },292 "fns": {293 "is": function () {}294 },295 "bi": {296 "is": function () {}297 },298 "num": {299 "is": function () {}300 },301 "text": {302 "is": function () {},303 "ify": function () {},304 "random": function () {},305 "match": function () {}306 },307 "list": {308 "is": function () {},309 "slit": function () {},310 "sort": function () {},311 "map": function () {},312 "index": {}313 },314 "obj": {315 "is": function () {},316 "put": function () {},317 "has": function () {},318 "del": function () {},319 "as": function () {},320 "ify": function () {},321 "to": function () {},322 "copy": function () {},323 "empty": function () {},324 "map": function () {}325 },326 "time": {327 "is": function () {}328 },329 "HAM": {330 "union": function () {},331 "delta": function () {},332 "synth": function () {}333 },334 "val": {335 "is": function () {},336 "rel": {337 "_": {},338 "is": function () {},339 "ify": function () {}340 }341 },342 "node": {343 "_": {},344 "soul": {345 "ify": function () {}346 },347 "is": function () {},348 "ify": function () {}349 },350 "state": {351 "_": {},352 "ify": function () {},353 "is": function () {},354 "map": function () {}355 },356 "graph": {357 "is": function () {},358 "ify": function () {},359 "node": function () {},360 "to": function () {}361 },362 "dup": function () {},363 "on": {364 "stun": function () {},365 "ask": {366 "on": function () {}367 },368 "ack": function () {},369 "_": {370 "next": function () {}371 },372 "off": function () {}373 },374 "_": {375 "node": {},376 "soul": {},377 "state": {},378 "field": {},379 "value": {}380 },381 "create": function () {},382 "log": {383 "once": {384 "welcome": {}385 }386 },387 "tag": {}388 },389 "as": {},390 "back": {}391 }392 },393 "put": {394 "tag": {},395 "to": {396 "off": function () {},397 "to": {398 "next": function () {}399 },400 "next": function () {},401 "the": {},402 "on": {403 "is": function () {},404 "version": {},405 "chain": {406 "toJSON": function () {},407 "opt": function () {},408 "back": function () {},409 "chain": {410 "input": function () {}411 },412 "get": function () {},413 "put": function () {},414 "key": function () {},415 "path": function () {},416 "on": function () {},417 "val": function () {},418 "off": function () {},419 "not": function () {},420 "map": function () {},421 "init": function () {},422 "set": function () {}423 },424 "fn": {425 "is": function () {}426 },427 "fns": {428 "is": function () {}429 },430 "bi": {431 "is": function () {}432 },433 "num": {434 "is": function () {}435 },436 "text": {437 "is": function () {},438 "ify": function () {},439 "random": function () {},440 "match": function () {}441 },442 "list": {443 "is": function () {},444 "slit": function () {},445 "sort": function () {},446 "map": function () {},447 "index": {}448 },449 "obj": {450 "is": function () {},451 "put": function () {},452 "has": function () {},453 "del": function () {},454 "as": function () {},455 "ify": function () {},456 "to": function () {},457 "copy": function () {},458 "empty": function () {},459 "map": function () {}460 },461 "time": {462 "is": function () {}463 },464 "HAM": {465 "union": function () {},466 "delta": function () {},467 "synth": function () {}468 },469 "val": {470 "is": function () {},471 "rel": {472 "_": {},473 "is": function () {},474 "ify": function () {}475 }476 },477 "node": {478 "_": {},479 "soul": {480 "ify": function () {}481 },482 "is": function () {},483 "ify": function () {}484 },485 "state": {486 "_": {},487 "ify": function () {},488 "is": function () {},489 "map": function () {}490 },491 "graph": {492 "is": function () {},493 "ify": function () {},494 "node": function () {},495 "to": function () {}496 },497 "dup": function () {},498 "on": {499 "stun": function () {},500 "ask": {501 "on": function () {}502 },503 "ack": function () {},504 "_": {505 "next": function () {}506 },507 "off": function () {}508 },509 "_": {510 "node": {},511 "soul": {},512 "state": {},513 "field": {},514 "value": {}515 },516 "create": function () {},517 "log": {518 "once": {519 "welcome": {}520 }521 },522 "tag": {}523 },524 "as": {},525 "back": {}526 },527 "last": {528 "off": function () {},529 "to": {530 "next": function () {}531 },532 "next": function () {},533 "the": {},534 "on": {535 "is": function () {},536 "version": {},537 "chain": {538 "toJSON": function () {},539 "opt": function () {},540 "back": function () {},541 "chain": {542 "input": function () {}543 },544 "get": function () {},545 "put": function () {},546 "key": function () {},547 "path": function () {},548 "on": function () {},549 "val": function () {},550 "off": function () {},551 "not": function () {},552 "map": function () {},553 "init": function () {},554 "set": function () {}555 },556 "fn": {557 "is": function () {}558 },559 "fns": {560 "is": function () {}561 },562 "bi": {563 "is": function () {}564 },565 "num": {566 "is": function () {}567 },568 "text": {569 "is": function () {},570 "ify": function () {},571 "random": function () {},572 "match": function () {}573 },574 "list": {575 "is": function () {},576 "slit": function () {},577 "sort": function () {},578 "map": function () {},579 "index": {}580 },581 "obj": {582 "is": function () {},583 "put": function () {},584 "has": function () {},585 "del": function () {},586 "as": function () {},587 "ify": function () {},588 "to": function () {},589 "copy": function () {},590 "empty": function () {},591 "map": function () {}592 },593 "time": {594 "is": function () {}595 },596 "HAM": {597 "union": function () {},598 "delta": function () {},599 "synth": function () {}600 },601 "val": {602 "is": function () {},603 "rel": {604 "_": {},605 "is": function () {},606 "ify": function () {}607 }608 },609 "node": {610 "_": {},611 "soul": {612 "ify": function () {}613 },614 "is": function () {},615 "ify": function () {}616 },617 "state": {618 "_": {},619 "ify": function () {},620 "is": function () {},621 "map": function () {}622 },623 "graph": {624 "is": function () {},625 "ify": function () {},626 "node": function () {},627 "to": function () {}628 },629 "dup": function () {},630 "on": {631 "stun": function () {},632 "ask": {633 "on": function () {}634 },635 "ack": function () {},636 "_": {637 "next": function () {}638 },639 "off": function () {}640 },641 "_": {642 "node": {},643 "soul": {},644 "state": {},645 "field": {},646 "value": {}647 },648 "create": function () {},649 "log": {650 "once": {651 "welcome": {}652 }653 },654 "tag": {}655 },656 "as": {},657 "back": {}658 }659 },660 "get": {661 "tag": {},662 "to": {663 "off": function () {},664 "to": {665 "next": function () {}666 },667 "next": function () {},668 "the": {},669 "on": {670 "is": function () {},671 "version": {},672 "chain": {673 "toJSON": function () {},674 "opt": function () {},675 "back": function () {},676 "chain": {677 "input": function () {}678 },679 "get": function () {},680 "put": function () {},681 "key": function () {},682 "path": function () {},683 "on": function () {},684 "val": function () {},685 "off": function () {},686 "not": function () {},687 "map": function () {},688 "init": function () {},689 "set": function () {}690 },691 "fn": {692 "is": function () {}693 },694 "fns": {695 "is": function () {}696 },697 "bi": {698 "is": function () {}699 },700 "num": {701 "is": function () {}702 },703 "text": {704 "is": function () {},705 "ify": function () {},706 "random": function () {},707 "match": function () {}708 },709 "list": {710 "is": function () {},711 "slit": function () {},712 "sort": function () {},713 "map": function () {},714 "index": {}715 },716 "obj": {717 "is": function () {},718 "put": function () {},719 "has": function () {},720 "del": function () {},721 "as": function () {},722 "ify": function () {},723 "to": function () {},724 "copy": function () {},725 "empty": function () {},726 "map": function () {}727 },728 "time": {729 "is": function () {}730 },731 "HAM": {732 "union": function () {},733 "delta": function () {},734 "synth": function () {}735 },736 "val": {737 "is": function () {},738 "rel": {739 "_": {},740 "is": function () {},741 "ify": function () {}742 }743 },744 "node": {745 "_": {},746 "soul": {747 "ify": function () {}748 },749 "is": function () {},750 "ify": function () {}751 },752 "state": {753 "_": {},754 "ify": function () {},755 "is": function () {},756 "map": function () {}757 },758 "graph": {759 "is": function () {},760 "ify": function () {},761 "node": function () {},762 "to": function () {}763 },764 "dup": function () {},765 "on": {766 "stun": function () {},767 "ask": {768 "on": function () {}769 },770 "ack": function () {},771 "_": {772 "next": function () {}773 },774 "off": function () {}775 },776 "_": {777 "node": {},778 "soul": {},779 "state": {},780 "field": {},781 "value": {}782 },783 "create": function () {},784 "log": {785 "once": {786 "welcome": {}787 }788 },789 "tag": {}790 },791 "as": {},792 "back": {}793 },794 "last": {795 "off": function () {},796 "to": {797 "next": function () {}798 },799 "next": function () {},800 "the": {},801 "on": {802 "is": function () {},803 "version": {},804 "chain": {805 "toJSON": function () {},806 "opt": function () {},807 "back": function () {},808 "chain": {809 "input": function () {}810 },811 "get": function () {},812 "put": function () {},813 "key": function () {},814 "path": function () {},815 "on": function () {},816 "val": function () {},817 "off": function () {},818 "not": function () {},819 "map": function () {},820 "init": function () {},821 "set": function () {}822 },823 "fn": {824 "is": function () {}825 },826 "fns": {827 "is": function () {}828 },829 "bi": {830 "is": function () {}831 },832 "num": {833 "is": function () {}834 },835 "text": {836 "is": function () {},837 "ify": function () {},838 "random": function () {},839 "match": function () {}840 },841 "list": {842 "is": function () {},843 "slit": function () {},844 "sort": function () {},845 "map": function () {},846 "index": {}847 },848 "obj": {849 "is": function () {},850 "put": function () {},851 "has": function () {},852 "del": function () {},853 "as": function () {},854 "ify": function () {},855 "to": function () {},856 "copy": function () {},857 "empty": function () {},858 "map": function () {}859 },860 "time": {861 "is": function () {}862 },863 "HAM": {864 "union": function () {},865 "delta": function () {},866 "synth": function () {}867 },868 "val": {869 "is": function () {},870 "rel": {871 "_": {},872 "is": function () {},873 "ify": function () {}874 }875 },876 "node": {877 "_": {},878 "soul": {879 "ify": function () {}880 },881 "is": function () {},882 "ify": function () {}883 },884 "state": {885 "_": {},886 "ify": function () {},887 "is": function () {},888 "map": function () {}889 },890 "graph": {891 "is": function () {},892 "ify": function () {},893 "node": function () {},894 "to": function () {}895 },896 "dup": function () {},897 "on": {898 "stun": function () {},899 "ask": {900 "on": function () {}901 },902 "ack": function () {},903 "_": {904 "next": function () {}905 },906 "off": function () {}907 },908 "_": {909 "node": {},910 "soul": {},911 "state": {},912 "field": {},913 "value": {}914 },915 "create": function () {},916 "log": {917 "once": {918 "welcome": {}919 }920 },921 "tag": {}922 },923 "as": {},924 "back": {}925 }926 },927 "opt": {928 "tag": {},929 "to": {930 "off": function () {},931 "to": {932 "next": function () {}933 },934 "next": function () {},935 "the": {},936 "on": {937 "is": function () {},938 "version": {},939 "chain": {940 "toJSON": function () {},941 "opt": function () {},942 "back": function () {},943 "chain": {944 "input": function () {}945 },946 "get": function () {},947 "put": function () {},948 "key": function () {},949 "path": function () {},950 "on": function () {},951 "val": function () {},952 "off": function () {},953 "not": function () {},954 "map": function () {},955 "init": function () {},956 "set": function () {}957 },958 "fn": {959 "is": function () {}960 },961 "fns": {962 "is": function () {}963 },964 "bi": {965 "is": function () {}966 },967 "num": {968 "is": function () {}969 },970 "text": {971 "is": function () {},972 "ify": function () {},973 "random": function () {},974 "match": function () {}975 },976 "list": {977 "is": function () {},978 "slit": function () {},979 "sort": function () {},980 "map": function () {},981 "index": {}982 },983 "obj": {984 "is": function () {},985 "put": function () {},986 "has": function () {},987 "del": function () {},988 "as": function () {},989 "ify": function () {},990 "to": function () {},991 "copy": function () {},992 "empty": function () {},993 "map": function () {}994 },995 "time": {996 "is": function () {}997 },998 "HAM": {999 "union": function () {},1000 "delta": function () {},1001 "synth": function () {}1002 },1003 "val": {1004 "is": function () {},1005 "rel": {1006 "_": {},1007 "is": function () {},1008 "ify": function () {}1009 }1010 },1011 "node": {1012 "_": {},1013 "soul": {1014 "ify": function () {}1015 },1016 "is": function () {},1017 "ify": function () {}1018 },1019 "state": {1020 "_": {},1021 "ify": function () {},1022 "is": function () {},1023 "map": function () {}1024 },1025 "graph": {1026 "is": function () {},1027 "ify": function () {},1028 "node": function () {},1029 "to": function () {}1030 },1031 "dup": function () {},1032 "on": {1033 "stun": function () {},1034 "ask": {1035 "on": function () {}1036 },1037 "ack": function () {},1038 "_": {1039 "next": function () {}1040 },1041 "off": function () {}1042 },1043 "_": {1044 "node": {},1045 "soul": {},1046 "state": {},1047 "field": {},1048 "value": {}1049 },1050 "create": function () {},1051 "log": {1052 "once": {1053 "welcome": {}1054 }1055 },1056 "tag": {}1057 },1058 "as": {},1059 "back": {}1060 },1061 "last": {1062 "off": function () {},1063 "to": {1064 "next": function () {}1065 },1066 "next": function () {},1067 "the": {},1068 "on": {1069 "is": function () {},1070 "version": {},1071 "chain": {1072 "toJSON": function () {},1073 "opt": function () {},1074 "back": function () {},1075 "chain": {1076 "input": function () {}1077 },1078 "get": function () {},1079 "put": function () {},1080 "key": function () {},1081 "path": function () {},1082 "on": function () {},1083 "val": function () {},1084 "off": function () {},1085 "not": function () {},1086 "map": function () {},1087 "init": function () {},1088 "set": function () {}1089 },1090 "fn": {1091 "is": function () {}1092 },1093 "fns": {1094 "is": function () {}1095 },1096 "bi": {1097 "is": function () {}1098 },1099 "num": {1100 "is": function () {}1101 },1102 "text": {1103 "is": function () {},1104 "ify": function () {},1105 "random": function () {},1106 "match": function () {}1107 },1108 "list": {1109 "is": function () {},1110 "slit": function () {},1111 "sort": function () {},1112 "map": function () {},1113 "index": {}1114 },1115 "obj": {1116 "is": function () {},1117 "put": function () {},1118 "has": function () {},1119 "del": function () {},1120 "as": function () {},1121 "ify": function () {},1122 "to": function () {},1123 "copy": function () {},1124 "empty": function () {},1125 "map": function () {}1126 },1127 "time": {1128 "is": function () {}1129 },1130 "HAM": {1131 "union": function () {},1132 "delta": function () {},1133 "synth": function () {}1134 },1135 "val": {1136 "is": function () {},1137 "rel": {1138 "_": {},1139 "is": function () {},1140 "ify": function () {}1141 }1142 },1143 "node": {1144 "_": {},1145 "soul": {1146 "ify": function () {}1147 },1148 "is": function () {},1149 "ify": function () {}1150 },1151 "state": {1152 "_": {},1153 "ify": function () {},1154 "is": function () {},1155 "map": function () {}1156 },1157 "graph": {1158 "is": function () {},1159 "ify": function () {},1160 "node": function () {},1161 "to": function () {}1162 },1163 "dup": function () {},1164 "on": {1165 "stun": function () {},1166 "ask": {1167 "on": function () {}1168 },1169 "ack": function () {},1170 "_": {1171 "next": function () {}1172 },1173 "off": function () {}1174 },1175 "_": {1176 "node": {},1177 "soul": {},1178 "state": {},1179 "field": {},1180 "value": {}1181 },1182 "create": function () {},1183 "log": {1184 "once": {1185 "welcome": {}1186 }1187 },1188 "tag": {}1189 },1190 "as": {},1191 "back": {}1192 }1193 },1194 "out": {1195 "tag": {},1196 "to": {1197 "off": function () {},1198 "to": {1199 "next": function () {}1200 },1201 "next": function () {},1202 "the": {},1203 "on": {1204 "is": function () {},1205 "version": {},1206 "chain": {1207 "toJSON": function () {},1208 "opt": function () {},1209 "back": function () {},1210 "chain": {1211 "input": function () {}1212 },1213 "get": function () {},1214 "put": function () {},1215 "key": function () {},1216 "path": function () {},1217 "on": function () {},1218 "val": function () {},1219 "off": function () {},1220 "not": function () {},1221 "map": function () {},1222 "init": function () {},1223 "set": function () {}1224 },1225 "fn": {1226 "is": function () {}1227 },1228 "fns": {1229 "is": function () {}1230 },1231 "bi": {1232 "is": function () {}1233 },1234 "num": {1235 "is": function () {}1236 },1237 "text": {1238 "is": function () {},1239 "ify": function () {},1240 "random": function () {},1241 "match": function () {}1242 },1243 "list": {1244 "is": function () {},1245 "slit": function () {},1246 "sort": function () {},1247 "map": function () {},1248 "index": {}1249 },1250 "obj": {1251 "is": function () {},1252 "put": function () {},1253 "has": function () {},1254 "del": function () {},1255 "as": function () {},1256 "ify": function () {},1257 "to": function () {},1258 "copy": function () {},1259 "empty": function () {},1260 "map": function () {}1261 },1262 "time": {1263 "is": function () {}1264 },1265 "HAM": {1266 "union": function () {},1267 "delta": function () {},1268 "synth": function () {}1269 },1270 "val": {1271 "is": function () {},1272 "rel": {1273 "_": {},1274 "is": function () {},1275 "ify": function () {}1276 }1277 },1278 "node": {1279 "_": {},1280 "soul": {1281 "ify": function () {}1282 },1283 "is": function () {},1284 "ify": function () {}1285 },1286 "state": {1287 "_": {},1288 "ify": function () {},1289 "is": function () {},1290 "map": function () {}1291 },1292 "graph": {1293 "is": function () {},1294 "ify": function () {},1295 "node": function () {},1296 "to": function () {}1297 },1298 "dup": function () {},1299 "on": {1300 "stun": function () {},1301 "ask": {1302 "on": function () {}1303 },1304 "ack": function () {},1305 "_": {1306 "next": function () {}1307 },1308 "off": function () {}1309 },1310 "_": {1311 "node": {},1312 "soul": {},1313 "state": {},1314 "field": {},1315 "value": {}1316 },1317 "create": function () {},1318 "log": {1319 "once": {1320 "welcome": {}1321 }1322 },1323 "tag": {}1324 },1325 "as": {},1326 "back": {}1327 },1328 "last": {1329 "off": function () {},1330 "to": {1331 "next": function () {}1332 },1333 "next": function () {},1334 "the": {},1335 "on": {1336 "is": function () {},1337 "version": {},1338 "chain": {1339 "toJSON": function () {},1340 "opt": function () {},1341 "back": function () {},1342 "chain": {1343 "input": function () {}1344 },1345 "get": function () {},1346 "put": function () {},1347 "key": function () {},1348 "path": function () {},1349 "on": function () {},1350 "val": function () {},1351 "off": function () {},1352 "not": function () {},1353 "map": function () {},1354 "init": function () {},1355 "set": function () {}1356 },1357 "fn": {1358 "is": function () {}1359 },1360 "fns": {1361 "is": function () {}1362 },1363 "bi": {1364 "is": function () {}1365 },1366 "num": {1367 "is": function () {}1368 },1369 "text": {1370 "is": function () {},1371 "ify": function () {},1372 "random": function () {},1373 "match": function () {}1374 },1375 "list": {1376 "is": function () {},1377 "slit": function () {},1378 "sort": function () {},1379 "map": function () {},1380 "index": {}1381 },1382 "obj": {1383 "is": function () {},1384 "put": function () {},1385 "has": function () {},1386 "del": function () {},1387 "as": function () {},1388 "ify": function () {},1389 "to": function () {},1390 "copy": function () {},1391 "empty": function () {},1392 "map": function () {}1393 },1394 "time": {1395 "is": function () {}1396 },1397 "HAM": {1398 "union": function () {},1399 "delta": function () {},1400 "synth": function () {}1401 },1402 "val": {1403 "is": function () {},1404 "rel": {1405 "_": {},1406 "is": function () {},1407 "ify": function () {}1408 }1409 },1410 "node": {1411 "_": {},1412 "soul": {1413 "ify": function () {}1414 },1415 "is": function () {},1416 "ify": function () {}1417 },1418 "state": {1419 "_": {},1420 "ify": function () {},1421 "is": function () {},1422 "map": function () {}1423 },1424 "graph": {1425 "is": function () {},1426 "ify": function () {},1427 "node": function () {},1428 "to": function () {}1429 },1430 "dup": function () {},1431 "on": {1432 "stun": function () {},1433 "ask": {1434 "on": function () {}1435 },1436 "ack": function () {},1437 "_": {1438 "next": function () {}1439 },1440 "off": function () {}1441 },1442 "_": {1443 "node": {},1444 "soul": {},1445 "state": {},1446 "field": {},1447 "value": {}1448 },1449 "create": function () {},1450 "log": {1451 "once": {1452 "welcome": {}1453 }1454 },1455 "tag": {}1456 },1457 "as": {},1458 "back": {}1459 }1460 }1461 }1462};1463Gun.prototype = {1464 "toJSON": function () {},1465 "opt": function () {},1466 "back": function () {},1467 "chain": function () {},1468 "get": function () {},1469 "put": function () {},1470 "key": function () {},1471 "path": function () {},1472 "on": function () {},1473 "val": function () {},1474 "off": function () {},1475 "not": function () {},1476 "map": function () {},1477 "init": function () {},1478 "set": function () {}1479};1480Gun.dup.prototype = {1481 "track": function () {},1482 "check": function () {},1483 "gc": function () {}1484};1485Gun.tag.next.to.on.prototype = {1486 "toJSON": function () {},1487 "opt": function () {},1488 "back": function () {},1489 "chain": function () {},1490 "get": function () {},1491 "put": function () {},1492 "key": function () {},1493 "path": function () {},1494 "on": function () {},1495 "val": function () {},1496 "off": function () {},1497 "not": function () {},1498 "map": function () {},1499 "init": function () {},1500 "set": function () {}1501};1502Gun.tag.next.to.on.dup.prototype = {1503 "track": function () {},1504 "check": function () {},1505 "gc": function () {}1506};1507Gun.tag.next.last.on.prototype = {1508 "toJSON": function () {},1509 "opt": function () {},1510 "back": function () {},1511 "chain": function () {},1512 "get": function () {},1513 "put": function () {},1514 "key": function () {},1515 "path": function () {},1516 "on": function () {},1517 "val": function () {},1518 "off": function () {},1519 "not": function () {},1520 "map": function () {},1521 "init": function () {},1522 "set": function () {}1523};1524Gun.tag.next.last.on.dup.prototype = {1525 "track": function () {},1526 "check": function () {},1527 "gc": function () {}1528};1529Gun.tag.put.to.on.prototype = {1530 "toJSON": function () {},1531 "opt": function () {},1532 "back": function () {},1533 "chain": function () {},1534 "get": function () {},1535 "put": function () {},1536 "key": function () {},1537 "path": function () {},1538 "on": function () {},1539 "val": function () {},1540 "off": function () {},1541 "not": function () {},1542 "map": function () {},1543 "init": function () {},1544 "set": function () {}1545};1546Gun.tag.put.to.on.dup.prototype = {1547 "track": function () {},1548 "check": function () {},1549 "gc": function () {}1550};1551Gun.tag.put.last.on.prototype = {1552 "toJSON": function () {},1553 "opt": function () {},1554 "back": function () {},1555 "chain": function () {},1556 "get": function () {},1557 "put": function () {},1558 "key": function () {},1559 "path": function () {},1560 "on": function () {},1561 "val": function () {},1562 "off": function () {},1563 "not": function () {},1564 "map": function () {},1565 "init": function () {},1566 "set": function () {}1567};1568Gun.tag.put.last.on.dup.prototype = {1569 "track": function () {},1570 "check": function () {},1571 "gc": function () {}1572};1573Gun.tag.get.to.on.prototype = {1574 "toJSON": function () {},1575 "opt": function () {},1576 "back": function () {},1577 "chain": function () {},1578 "get": function () {},1579 "put": function () {},1580 "key": function () {},1581 "path": function () {},1582 "on": function () {},1583 "val": function () {},1584 "off": function () {},1585 "not": function () {},1586 "map": function () {},1587 "init": function () {},1588 "set": function () {}1589};1590Gun.tag.get.to.on.dup.prototype = {1591 "track": function () {},1592 "check": function () {},1593 "gc": function () {}1594};1595Gun.tag.get.last.on.prototype = {1596 "toJSON": function () {},1597 "opt": function () {},1598 "back": function () {},1599 "chain": function () {},1600 "get": function () {},1601 "put": function () {},1602 "key": function () {},1603 "path": function () {},1604 "on": function () {},1605 "val": function () {},1606 "off": function () {},1607 "not": function () {},1608 "map": function () {},1609 "init": function () {},1610 "set": function () {}1611};1612Gun.tag.get.last.on.dup.prototype = {1613 "track": function () {},1614 "check": function () {},1615 "gc": function () {}1616};1617Gun.tag.opt.to.on.prototype = {1618 "toJSON": function () {},1619 "opt": function () {},1620 "back": function () {},1621 "chain": function () {},1622 "get": function () {},1623 "put": function () {},1624 "key": function () {},1625 "path": function () {},1626 "on": function () {},1627 "val": function () {},1628 "off": function () {},1629 "not": function () {},1630 "map": function () {},1631 "init": function () {},1632 "set": function () {}1633};1634Gun.tag.opt.to.on.dup.prototype = {1635 "track": function () {},1636 "check": function () {},1637 "gc": function () {}1638};1639Gun.tag.opt.last.on.prototype = {1640 "toJSON": function () {},1641 "opt": function () {},1642 "back": function () {},1643 "chain": function () {},1644 "get": function () {},1645 "put": function () {},1646 "key": function () {},1647 "path": function () {},1648 "on": function () {},1649 "val": function () {},1650 "off": function () {},1651 "not": function () {},1652 "map": function () {},1653 "init": function () {},1654 "set": function () {}1655};1656Gun.tag.opt.last.on.dup.prototype = {1657 "track": function () {},1658 "check": function () {},1659 "gc": function () {}1660};1661Gun.tag.out.to.on.prototype = {1662 "toJSON": function () {},1663 "opt": function () {},1664 "back": function () {},1665 "chain": function () {},1666 "get": function () {},1667 "put": function () {},1668 "key": function () {},1669 "path": function () {},1670 "on": function () {},1671 "val": function () {},1672 "off": function () {},1673 "not": function () {},1674 "map": function () {},1675 "init": function () {},1676 "set": function () {}1677};1678Gun.tag.out.to.on.dup.prototype = {1679 "track": function () {},1680 "check": function () {},1681 "gc": function () {}1682};1683Gun.tag.out.last.on.prototype = {1684 "toJSON": function () {},1685 "opt": function () {},1686 "back": function () {},1687 "chain": function () {},1688 "get": function () {},1689 "put": function () {},1690 "key": function () {},1691 "path": function () {},1692 "on": function () {},1693 "val": function () {},1694 "off": function () {},1695 "not": function () {},1696 "map": function () {},1697 "init": function () {},1698 "set": function () {}1699};1700Gun.tag.out.last.on.dup.prototype = {1701 "track": function () {},1702 "check": function () {},1703 "gc": function () {}1704};1705/**********************************************************************1706 * End Generated Extern for Gun...

Full Screen

Full Screen

data_list.js

Source:data_list.js Github

copy

Full Screen

1var URL = 'http://localhost:5050/'2let category_data = [{3 name: "新品",4 id: "new",5 content: [{6 title: '手机',7 contentList: [{8 img: URL + "images/classIfy/new/phone1.png",9 name: "红米Note 7",10 },11 {12 img: URL + "images/classIfy/new/phone2.png",13 name: "小米MIX 3",14 },15 {16 img: URL + "images/classIfy/new/phone3.png",17 name: "小米8 青春版",18 },19 {20 img: URL + "images/classIfy/new/phone4.png",21 name: "小米8 屏幕指纹版",22 }23 ]24 },25 {26 title: "电视",27 contentList: [{28 img: URL + "images/classIfy/new/tv1.jpg",29 name: "75英寸 4S",30 },31 {32 img: URL + "images/classIfy/new/tv2.jpg",33 name: "58英寸电视4A",34 },35 {36 img: URL + "images/classIfy/new/tv3.jpg",37 name: "40英寸 电视4C",38 },39 {40 img: URL + "images/classIfy/new/tv4.jpg",41 name: "43英寸 4X",42 },43 {44 img: URL + "images/classIfy/new/tv5.jpg",45 name: '65"电视4旗舰版',46 },47 {48 img: URL + "images/classIfy/new/tv6.jpg",49 name: "55英寸 4X",50 }51 ]52 },53 {54 title: "电脑",55 contentList: [{56 img: URL + "images/classIfy/new/computer1.jpg",57 name: '15.6"笔记本',58 },59 {60 img: URL + "images/classIfy/new/computer2.jpg",61 name: '13.3" i3 银色版',62 },63 {64 img: URL + "images/classIfy/new/computer3.png",65 name: '12.5"office版',66 }67 ]68 }69 ]70 },71 {72 name: '众筹',73 id: 'raise',74 content: [{75 title: "众筹好物",76 contentList: [{77 img: URL + "images/classIfy/new/tv1.jpg",78 name: "75英寸 4S",79 },80 {81 img: URL + "images/classIfy/new/tv2.jpg",82 name: "58英寸电视4A",83 },84 {85 img: URL + "images/classIfy/new/tv3.jpg",86 name: "40英寸 电视4C",87 },88 {89 img: URL + "images/classIfy/new/tv4.jpg",90 name: "43英寸 4X",91 },92 {93 img: URL + "images/classIfy/new/tv5.jpg",94 name: '65"电视4旗舰版',95 },96 {97 img: URL + "images/classIfy/new/tv6.jpg",98 name: "55英寸 4X",99 }100 ]101 }, ]102 }, {103 name: "手机",104 id: "phone",105 content: [{106 title: '手机',107 contentList: [{108 img: URL + "images/classIfy/new/phone1.png",109 name: "红米Note 7",110 },111 {112 img: URL + "images/classIfy/new/phone2.png",113 name: "小米MIX 3",114 },115 {116 img: URL + "images/classIfy/new/phone3.png",117 name: "小米8 青春版",118 },119 {120 img: URL + "images/classIfy/new/phone4.png",121 name: "小米8 屏幕指纹版",122 }123 ]124 }, ]125 }, {126 name: "电视",127 id: "tv",128 content: [{129 title: '电视',130 contentList: [{131 img: URL + "images/classIfy/new/tv1.jpg",132 name: "75英寸 4S",133 },134 {135 img: URL + "images/classIfy/new/tv2.jpg",136 name: "58英寸电视4A",137 },138 {139 img: URL + "images/classIfy/new/tv3.jpg",140 name: "40英寸 电视4C",141 },142 {143 img: URL + "images/classIfy/new/tv4.jpg",144 name: "43英寸 4X",145 },146 {147 img: URL + "images/classIfy/new/tv5.jpg",148 name: '65"电视4旗舰版',149 },150 {151 img: URL + "images/classIfy/new/tv6.jpg",152 name: "55英寸 4X",153 }154 ]155 }, ]156 }, {157 name: "电脑",158 id: "laptop",159 content: [{160 title: '电视',161 contentList: [{162 img: URL + "images/classIfy/new/tv1.jpg",163 name: "75英寸 4S",164 },165 {166 img: URL + "images/classIfy/new/tv2.jpg",167 name: "58英寸电视4A",168 },169 {170 img: URL + "images/classIfy/new/tv3.jpg",171 name: "40英寸 电视4C",172 },173 {174 img: URL + "images/classIfy/new/tv4.jpg",175 name: "43英寸 4X",176 },177 {178 img: URL + "images/classIfy/new/tv5.jpg",179 name: '65"电视4旗舰版',180 },181 {182 img: URL + "images/classIfy/new/tv6.jpg",183 name: "55英寸 4X",184 }185 ]186 },]187 }, {188 name: "家电",189 id: "appliance",190 content: [{191 title: '电视',192 contentList: [{193 img: URL + "images/classIfy/new/tv1.jpg",194 name: "75英寸 4S",195 },196 {197 img: URL + "images/classIfy/new/tv2.jpg",198 name: "58英寸电视4A",199 },200 {201 img: URL + "images/classIfy/new/tv3.jpg",202 name: "40英寸 电视4C",203 },204 {205 img: URL + "images/classIfy/new/tv4.jpg",206 name: "43英寸 4X",207 },208 {209 img: URL + "images/classIfy/new/tv5.jpg",210 name: '65"电视4旗舰版',211 },212 {213 img: URL + "images/classIfy/new/tv6.jpg",214 name: "55英寸 4X",215 }216 ]217 },]218 }, {219 name: "路由",220 id: "router",221 content: [{222 title: '电视',223 contentList: [{224 img: URL + "images/classIfy/new/tv1.jpg",225 name: "75英寸 4S",226 },227 {228 img: URL + "images/classIfy/new/tv2.jpg",229 name: "58英寸电视4A",230 },231 {232 img: URL + "images/classIfy/new/tv3.jpg",233 name: "40英寸 电视4C",234 },235 {236 img: URL + "images/classIfy/new/tv4.jpg",237 name: "43英寸 4X",238 },239 {240 img: URL + "images/classIfy/new/tv5.jpg",241 name: '65"电视4旗舰版',242 },243 {244 img: URL + "images/classIfy/new/tv6.jpg",245 name: "55英寸 4X",246 }247 ]248 },]249 }, {250 name: '出行',251 id: 'travel',252 content: [{253 title: '电视',254 contentList: [{255 img: URL + "images/classIfy/new/tv1.jpg",256 name: "75英寸 4S",257 },258 {259 img: URL + "images/classIfy/new/tv2.jpg",260 name: "58英寸电视4A",261 },262 {263 img: URL + "images/classIfy/new/tv3.jpg",264 name: "40英寸 电视4C",265 },266 {267 img: URL + "images/classIfy/new/tv4.jpg",268 name: "43英寸 4X",269 },270 {271 img: URL + "images/classIfy/new/tv5.jpg",272 name: '65"电视4旗舰版',273 },274 {275 img: URL + "images/classIfy/new/tv6.jpg",276 name: "55英寸 4X",277 }278 ]279 },]280 }, {281 name: '穿戴',282 id: 'wear',283 content: [{284 title: '电视',285 contentList: [{286 img: URL + "images/classIfy/new/tv1.jpg",287 name: "75英寸 4S",288 },289 {290 img: URL + "images/classIfy/new/tv2.jpg",291 name: "58英寸电视4A",292 },293 {294 img: URL + "images/classIfy/new/tv3.jpg",295 name: "40英寸 电视4C",296 },297 {298 img: URL + "images/classIfy/new/tv4.jpg",299 name: "43英寸 4X",300 },301 {302 img: URL + "images/classIfy/new/tv5.jpg",303 name: '65"电视4旗舰版',304 },305 {306 img: URL + "images/classIfy/new/tv6.jpg",307 name: "55英寸 4X",308 }309 ]310 },]311 }, {312 name: "智能",313 id: "smart",314 content: [{315 title: '电视',316 contentList: [{317 img: URL + "images/classIfy/new/tv1.jpg",318 name: "75英寸 4S",319 },320 {321 img: URL + "images/classIfy/new/tv2.jpg",322 name: "58英寸电视4A",323 },324 {325 img: URL + "images/classIfy/new/tv3.jpg",326 name: "40英寸 电视4C",327 },328 {329 img: URL + "images/classIfy/new/tv4.jpg",330 name: "43英寸 4X",331 },332 {333 img: URL + "images/classIfy/new/tv5.jpg",334 name: '65"电视4旗舰版',335 },336 {337 img: URL + "images/classIfy/new/tv6.jpg",338 name: "55英寸 4X",339 }340 ]341 },]342 }, {343 name: "电源",344 id: "adapter",345 content: [{346 title: '电视',347 contentList: [{348 img: URL + "images/classIfy/new/tv1.jpg",349 name: "75英寸 4S",350 },351 {352 img: URL + "images/classIfy/new/tv2.jpg",353 name: "58英寸电视4A",354 },355 {356 img: URL + "images/classIfy/new/tv3.jpg",357 name: "40英寸 电视4C",358 },359 {360 img: URL + "images/classIfy/new/tv4.jpg",361 name: "43英寸 4X",362 },363 {364 img: URL + "images/classIfy/new/tv5.jpg",365 name: '65"电视4旗舰版',366 },367 {368 img: URL + "images/classIfy/new/tv6.jpg",369 name: "55英寸 4X",370 }371 ]372 },]373 }, {374 name: "健康",375 id: "health",376 content: [{377 title: '电视',378 contentList: [{379 img: URL + "images/classIfy/new/tv1.jpg",380 name: "75英寸 4S",381 },382 {383 img: URL + "images/classIfy/new/tv2.jpg",384 name: "58英寸电视4A",385 },386 {387 img: URL + "images/classIfy/new/tv3.jpg",388 name: "40英寸 电视4C",389 },390 {391 img: URL + "images/classIfy/new/tv4.jpg",392 name: "43英寸 4X",393 },394 {395 img: URL + "images/classIfy/new/tv5.jpg",396 name: '65"电视4旗舰版',397 },398 {399 img: URL + "images/classIfy/new/tv6.jpg",400 name: "55英寸 4X",401 }402 ]403 },]404 }, {405 name: "灯具",406 id: "lamp",407 content: [{408 title: '电视',409 contentList: [{410 img: URL + "images/classIfy/new/tv1.jpg",411 name: "75英寸 4S",412 },413 {414 img: URL + "images/classIfy/new/tv2.jpg",415 name: "58英寸电视4A",416 },417 {418 img: URL + "images/classIfy/new/tv3.jpg",419 name: "40英寸 电视4C",420 },421 {422 img: URL + "images/classIfy/new/tv4.jpg",423 name: "43英寸 4X",424 },425 {426 img: URL + "images/classIfy/new/tv5.jpg",427 name: '65"电视4旗舰版',428 },429 {430 img: URL + "images/classIfy/new/tv6.jpg",431 name: "55英寸 4X",432 }433 ]434 },]435 }, {436 name: "儿童",437 id: "kids",438 content: [{439 title: '电视',440 contentList: [{441 img: URL + "images/classIfy/new/tv1.jpg",442 name: "75英寸 4S",443 },444 {445 img: URL + "images/classIfy/new/tv2.jpg",446 name: "58英寸电视4A",447 },448 {449 img: URL + "images/classIfy/new/tv3.jpg",450 name: "40英寸 电视4C",451 },452 {453 img: URL + "images/classIfy/new/tv4.jpg",454 name: "43英寸 4X",455 },456 {457 img: URL + "images/classIfy/new/tv5.jpg",458 name: '65"电视4旗舰版',459 },460 {461 img: URL + "images/classIfy/new/tv6.jpg",462 name: "55英寸 4X",463 }464 ]465 },]466 }, {467 name: "插线板",468 id: "panel",469 content: [{470 title: '电视',471 contentList: [{472 img: URL + "images/classIfy/new/tv1.jpg",473 name: "75英寸 4S",474 },475 {476 img: URL + "images/classIfy/new/tv2.jpg",477 name: "58英寸电视4A",478 },479 {480 img: URL + "images/classIfy/new/tv3.jpg",481 name: "40英寸 电视4C",482 },483 {484 img: URL + "images/classIfy/new/tv4.jpg",485 name: "43英寸 4X",486 },487 {488 img: URL + "images/classIfy/new/tv5.jpg",489 name: '65"电视4旗舰版',490 },491 {492 img: URL + "images/classIfy/new/tv6.jpg",493 name: "55英寸 4X",494 }495 ]496 },]497 }, {498 name: "音频",499 id: "audio",500 content: [{501 title: '电视',502 contentList: [{503 img: URL + "images/classIfy/new/tv1.jpg",504 name: "75英寸 4S",505 },506 {507 img: URL + "images/classIfy/new/tv2.jpg",508 name: "58英寸电视4A",509 },510 {511 img: URL + "images/classIfy/new/tv3.jpg",512 name: "40英寸 电视4C",513 },514 {515 img: URL + "images/classIfy/new/tv4.jpg",516 name: "43英寸 4X",517 },518 {519 img: URL + "images/classIfy/new/tv5.jpg",520 name: '65"电视4旗舰版',521 },522 {523 img: URL + "images/classIfy/new/tv6.jpg",524 name: "55英寸 4X",525 }526 ]527 },]528 }, {529 name: "耳机",530 id: "headset",531 content: [{532 title: '电视',533 contentList: [{534 img: URL + "images/classIfy/new/tv1.jpg",535 name: "75英寸 4S",536 },537 {538 img: URL + "images/classIfy/new/tv2.jpg",539 name: "58英寸电视4A",540 },541 {542 img: URL + "images/classIfy/new/tv3.jpg",543 name: "40英寸 电视4C",544 },545 {546 img: URL + "images/classIfy/new/tv4.jpg",547 name: "43英寸 4X",548 },549 {550 img: URL + "images/classIfy/new/tv5.jpg",551 name: '65"电视4旗舰版',552 },553 {554 img: URL + "images/classIfy/new/tv6.jpg",555 name: "55英寸 4X",556 }557 ]558 },]559 }, {560 name: "音箱",561 id: "voicebox",562 content: [{563 title: '电视',564 contentList: [{565 img: URL + "images/classIfy/new/tv1.jpg",566 name: "75英寸 4S",567 },568 {569 img: URL + "images/classIfy/new/tv2.jpg",570 name: "58英寸电视4A",571 },572 {573 img: URL + "images/classIfy/new/tv3.jpg",574 name: "40英寸 电视4C",575 },576 {577 img: URL + "images/classIfy/new/tv4.jpg",578 name: "43英寸 4X",579 },580 {581 img: URL + "images/classIfy/new/tv5.jpg",582 name: '65"电视4旗舰版',583 },584 {585 img: URL + "images/classIfy/new/tv6.jpg",586 name: "55英寸 4X",587 }588 ]589 },]590 }, {591 name: "箱包",592 id: "bags",593 content: [{594 title: '电视',595 contentList: [{596 img: URL + "images/classIfy/new/tv1.jpg",597 name: "75英寸 4S",598 },599 {600 img: URL + "images/classIfy/new/tv2.jpg",601 name: "58英寸电视4A",602 },603 {604 img: URL + "images/classIfy/new/tv3.jpg",605 name: "40英寸 电视4C",606 },607 {608 img: URL + "images/classIfy/new/tv4.jpg",609 name: "43英寸 4X",610 },611 {612 img: URL + "images/classIfy/new/tv5.jpg",613 name: '65"电视4旗舰版',614 },615 {616 img: URL + "images/classIfy/new/tv6.jpg",617 name: "55英寸 4X",618 }619 ]620 },]621 }, {622 name: "生活",623 id: "life",624 content: [{625 title: '电视',626 contentList: [{627 img: URL + "images/classIfy/new/tv1.jpg",628 name: "75英寸 4S",629 },630 {631 img: URL + "images/classIfy/new/tv2.jpg",632 name: "58英寸电视4A",633 },634 {635 img: URL + "images/classIfy/new/tv3.jpg",636 name: "40英寸 电视4C",637 },638 {639 img: URL + "images/classIfy/new/tv4.jpg",640 name: "43英寸 4X",641 },642 {643 img: URL + "images/classIfy/new/tv5.jpg",644 name: '65"电视4旗舰版',645 },646 {647 img: URL + "images/classIfy/new/tv6.jpg",648 name: "55英寸 4X",649 }650 ]651 },]652 }, {653 name: "配件",654 id: "part",655 content: [{656 title: '电视',657 contentList: [{658 img: URL + "images/classIfy/new/tv1.jpg",659 name: "75英寸 4S",660 },661 {662 img: URL + "images/classIfy/new/tv2.jpg",663 name: "58英寸电视4A",664 },665 {666 img: URL + "images/classIfy/new/tv3.jpg",667 name: "40英寸 电视4C",668 },669 {670 img: URL + "images/classIfy/new/tv4.jpg",671 name: "43英寸 4X",672 },673 {674 img: URL + "images/classIfy/new/tv5.jpg",675 name: '65"电视4旗舰版',676 },677 {678 img: URL + "images/classIfy/new/tv6.jpg",679 name: "55英寸 4X",680 }681 ]682 },]683 }, {684 name: "家装",685 id: "Home",686 content: [{687 title: '电视',688 contentList: [{689 img: URL + "images/classIfy/new/tv1.jpg",690 name: "75英寸 4S",691 },692 {693 img: URL + "images/classIfy/new/tv2.jpg",694 name: "58英寸电视4A",695 },696 {697 img: URL + "images/classIfy/new/tv3.jpg",698 name: "40英寸 电视4C",699 },700 {701 img: URL + "images/classIfy/new/tv4.jpg",702 name: "43英寸 4X",703 },704 {705 img: URL + "images/classIfy/new/tv5.jpg",706 name: '65"电视4旗舰版',707 },708 {709 img: URL + "images/classIfy/new/tv6.jpg",710 name: "55英寸 4X",711 }712 ]713 },]714 }, {715 name: "礼品",716 id: "gift",717 content: [{718 title: '电视',719 contentList: [{720 img: URL + "images/classIfy/new/tv1.jpg",721 name: "75英寸 4S",722 },723 {724 img: URL + "images/classIfy/new/tv2.jpg",725 name: "58英寸电视4A",726 },727 {728 img: URL + "images/classIfy/new/tv3.jpg",729 name: "40英寸 电视4C",730 },731 {732 img: URL + "images/classIfy/new/tv4.jpg",733 name: "43英寸 4X",734 },735 {736 img: URL + "images/classIfy/new/tv5.jpg",737 name: '65"电视4旗舰版',738 },739 {740 img: URL + "images/classIfy/new/tv6.jpg",741 name: "55英寸 4X",742 }743 ]744 },]745 }, {746 name: "服务",747 id: "service",748 content: [{749 title: '电视',750 contentList: [{751 img: URL + "images/classIfy/new/tv1.jpg",752 name: "75英寸 4S",753 },754 {755 img: URL + "images/classIfy/new/tv2.jpg",756 name: "58英寸电视4A",757 },758 {759 img: URL + "images/classIfy/new/tv3.jpg",760 name: "40英寸 电视4C",761 },762 {763 img: URL + "images/classIfy/new/tv4.jpg",764 name: "43英寸 4X",765 },766 {767 img: URL + "images/classIfy/new/tv5.jpg",768 name: '65"电视4旗舰版',769 },770 {771 img: URL + "images/classIfy/new/tv6.jpg",772 name: "55英寸 4X",773 }774 ]775 },]776 }, {777 name: "会员卡",778 id: "card",779 content: [{780 title: '电视',781 contentList: [{782 img: URL + "images/classIfy/new/tv1.jpg",783 name: "75英寸 4S",784 },785 {786 img: URL + "images/classIfy/new/tv2.jpg",787 name: "58英寸电视4A",788 },789 {790 img: URL + "images/classIfy/new/tv3.jpg",791 name: "40英寸 电视4C",792 },793 {794 img: URL + "images/classIfy/new/tv4.jpg",795 name: "43英寸 4X",796 },797 {798 img: URL + "images/classIfy/new/tv5.jpg",799 name: '65"电视4旗舰版',800 },801 {802 img: URL + "images/classIfy/new/tv6.jpg",803 name: "55英寸 4X",804 }805 ]806 },]807 }808]809module.exports = {810 category_data...

Full Screen

Full Screen

tt.js

Source:tt.js Github

copy

Full Screen

1var $ = function (id) {//·½±ã°´idÌáÈ¡2 return document.getElementById(id);3};4var arrAll = new Array();5var iTimeE = 60;6var iScore = 0;7var bMark = false;//ÊÇ·ñ¿ÉÀÛ»ý·Ö8function init(){//¼ÓÔØÄ£ÐÍ9 var oCon = $("mainDiv");10 var arrDiv0 = new Array();//7¸ö¡¯ÊúÏò¡®µÄÊý×é11 var arrDiv1 = new Array();12 var arrDiv2 = new Array();13 var arrDiv3 = new Array();14 var arrDiv4 = new Array();15 var arrDiv5 = new Array();16 var arrDiv6 = new Array();17 var arrDiv7 = new Array();18 19 arrAll = [arrDiv0,arrDiv1,arrDiv2,arrDiv3,arrDiv4,arrDiv5,arrDiv6];20 21 for(var i=0;i<7;i++){22 for(var j=0;j<7;j++){23 var oDiv = createDiv(i*49,j*49);24 oCon.appendChild(oDiv);25 arrAll[i][j] = oDiv;26 }27 }28 initCanDelete();29 beforeBegin();30 setTimeout('gameHandler()',3500);31}32function beforeBegin() {//ÏÔʾ3£¬2£¬1Ô¤±¸µ¹¼Æʱ33 var oBeginDiv = document.createElement("div");34 oBeginDiv.className = "beforeBegin";35 $("pa").appendChild(oBeginDiv);36 oBeginDiv.innerHTML ="<span style='width: 343px;height: 438px;color: white;font-size: 100;font-weight: bold;line-height: 438px;'>Three!</span>";37 setTimeout(function(){38 oBeginDiv.innerHTML ="<span style='width: 343px;height: 438px;color: white;font-size: 100;font-weight: bold;line-height: 438px;'>Two!</span>";39 setTimeout(function(){40 oBeginDiv.innerHTML ="<span style='width: 343px;height: 438px;color: white;font-size: 100;font-weight: bold;line-height: 438px;'>One!</span>";41 setTimeout(function(){42 oBeginDiv.innerHTML ="<span style='width: 343px;height: 438px;color: white;font-size: 100;font-weight: bold;line-height: 438px;'>Go!</span>";43 setTimeout(function(){$("pa").removeChild(oBeginDiv)},500);44 },1000);45 },1000);46 },1000);47}48function gameHandler(){//60Ãëµ¹¼Æʱ49 if(iTimeE>=0){50 var iWidth = $("handleBar").offsetWidth;51 $("handleBar").style.width = iTimeE/60*90+"%";52 iTimeE-=0.05;53 $("iTime").innerHTML=Math.ceil(iTimeE)+"'";54 setTimeout("gameHandler()",50);55 }else{56 var oBeginDiv = document.createElement("div");57 oBeginDiv.className = "beforeBegin";58 $("pa").appendChild(oBeginDiv);59 oBeginDiv.innerHTML ="<span style='width: 343px;height: 438px;color: white;font-size: 50;font-weight: bold;line-height: 438px;'>µÃ·Ö£º"+iScore+"!</span>";60 }61}62function initCanDelete(){//ÓÎÏ·¿ªÊ¼Ç°£¬½áÊøºó£¬ºÍÒƶ¯Ïû³ýºóмÓÔØ¡£¿É×éºÏÏû³ýµÄÏÈÏû³ýµôͨÓÃ63 var bInit = false;//ÊÇ·ñ»¹ÓпÉÏû³ýµÄ64 for(var i=0;i<7;i++){65 for(var j=0;j<7;j++){66 var deDivs = ifCanDelete(arrAll[i][j]);67 if(deDivs.length>0){68 deleteDivs(deDivs);69 fillAllArr();//ɾÍêºóÌîÂú70 bInit = true;71 }72 }73 }74 if(bInit){//ΪtrueÔòÖ¤Ã÷¸Õ²ÅÏû³ý¹ý¡£75 initCanDelete();//¸Õ²ÅÏû³ý¹ýÔòÓÐλÖñ䶯»¹µÃÔÙ±éÀúÒ»´Î76 }else{77 bMark = true;78 }79}80function deleteDivs(arr){//°´Êý×éɾ³ýdiv81 for(var n=0;n<arr.length;n++){82 var iDexy = findIndex(arr[n]);83 if(typeof(iDexy)!="undefined"){84 arrAll[iDexy.ri].splice(iDexy.rj,1);85 arr[n].parentNode.removeChild(arr[n]);86 if(bMark){87 iScore+=10;//¼Ó10·Ö88 $("iMark").innerHTML = iScore+"";89 }90 }91 }92}93var moveable = false;94var oSelectDiv;95function createDiv(iLeft,ibottom){//¹¹Ôìdiv96 var oDiv = document.createElement("div");97 oDiv.style.backgroundImage="url(img/zImg_"+Math.round(Math.random()*6)+".jpg)";98 oDiv.style.left = iLeft + "px";99 oDiv.style.bottom = ibottom + "px";100 oDiv.style.MozUserSelect="none"101 var posEx,posEy;102 oDiv.onmousedown=function(e){103 e = e ? e : (window.event ? window.event : null);104 posEx = e.clientX;//°´ÏÂÊó±êʱͬʱ¼ÇסÊó±êλÖÃ105 posEy = e.clientY;106 107 moveable = true;108 oSelectDiv=this;109 oSelectDiv.style.zIndex = 100;110 };111 var oBro;//ÏàÁÚdiv112 oDiv.onmousemove=function(e){113 e = e ? e : (window.event ? window.event : null); 114 115 if(moveable){116 var indexXY = findIndex(oSelectDiv);117 var eMoveLeft = e.clientX - posEx;118 var eMovebottom = e.clientY - posEy;119 var iBroi,iBroj;//ÁÙdivµÄλÖÃ120 121 if(Math.abs(eMoveLeft)>Math.abs(eMovebottom)){122 if(Math.abs(eMoveLeft)<49){123 iBroi = eMoveLeft>0?indexXY.ri+1:indexXY.ri-1;//¿´Êó±êµÄλÒÆÕý¸ºÅжÏÊÇ×óÓÒÊÇÄĸödiv»¥¶¯124 iBroj = indexXY.rj;125 if(iBroi>=0&&iBroi<7){//·ÀÖ¹±ßԵʱȡ²»µ½ÏàÁÚÔªËØ126 oBro = arrAll[iBroi][iBroj];127 oSelectDiv.style.left = indexXY.ri*49 + eMoveLeft + "px";128 oBro.style.left = iBroi*49 - eMoveLeft + "px";129 }130 }else{131 if(moveable) {132 moveable = false; 133 }134 this.style.zIndex = "";135 if(oBro!=null)136 changeIndex(oSelectDiv,oBro);137 }138 }else{139 if(Math.abs(eMovebottom)<49){140 iBroj = eMovebottom>0?indexXY.rj-1:indexXY.rj+1;141 iBroi = indexXY.ri;142 if(iBroj>=0&&iBroj<7){143 oBro = arrAll[iBroi][iBroj];144 145 oSelectDiv.style.bottom = indexXY.rj*49 - eMovebottom + "px";146 oBro.style.bottom = iBroj*49 + eMovebottom + "px";147 }148 }else{149 if(moveable){150 moveable = false; 151 }152 oSelectDiv.style.zIndex = "";153 if(oBro!=null)154 changeIndex(oSelectDiv,oBro);155 }156 }157 }158 }; 159 oDiv.onmouseup=function (e){160 if(moveable) {161 moveable = false; 162 }163 oSelectDiv.style.zIndex = "";164 if(oBro!=null)165 changeIndex(oSelectDiv,oBro);166 };167 return oDiv;168}169function changeIndex(oIdiv,oLdiv){170 var indexIJ_I = findIndex(oIdiv);171 var indexIJ_L = findIndex(oLdiv);172 173 arrAll[indexIJ_L.ri][indexIJ_L.rj] = oIdiv;//¸ü¸ÄÊý×éλÖÃ174 arrAll[indexIJ_I.ri][indexIJ_I.rj] = oLdiv;175 176 var arryI = ifCanDelete(oIdiv);177 var arryL = ifCanDelete(oLdiv);178 179 if(arryI.length==0&&arryL.length==0){//Èç¹ûûÓÐÏû³ý»ú»á·µ»ØλÖÃ180 oIdiv.style.left = indexIJ_I.ri*49;//»ØԭλÖÃ181 oIdiv.style.bottom = indexIJ_I.rj*49;182 183 oLdiv.style.left = indexIJ_L.ri*49;//v184 oLdiv.style.bottom = indexIJ_L.rj*49;185 186 arrAll[indexIJ_L.ri][indexIJ_L.rj] = oLdiv;187 arrAll[indexIJ_I.ri][indexIJ_I.rj] = oIdiv;188 }else{189 oIdiv.style.left = indexIJ_L.ri*49;//ÁÙdivµÄԭλÖøøÔ­div190 oIdiv.style.bottom = indexIJ_L.rj*49;191 192 oLdiv.style.left = indexIJ_I.ri*49;//Ô­divµÄԭλÖøøÁÙdiv193 oLdiv.style.bottom = indexIJ_I.rj*49;194 195 if(arryI.length>0){196 deleteDivs(arryI);197 }198 199 if(arryL.length>0){200 deleteDivs(arryL);201 }202 fillAllArr();//ɾÍêºóÌîÂú203 initCanDelete();//ÊÇ·ñÓÐÒýÆðÆäËüÏû³ý204 }205 oIdiv.style.backgroundImage;206}207function ifCanDelete(obj){//²é¿´Ä³¸ödivµÄµ±Ç°Î»ÖÃÊÇ·ñ¿ÉÏû³ý£¬·µ»ØµÄÊÇ¿ÉÏû³ýµÄdivÊý×é208 var colorI = obj.style.backgroundImage;209 var ifx = findIndex(obj).ri;210 var ify = findIndex(obj).rj;211 var arrLeft = new Array();212 var arrbottom = new Array();213 214 if(ifx-1>=0){//È¡×ó²àµÚÒ»¸ö215 var l1 = findColor(ifx-1,ify);216 if(l1==colorI){217 arrLeft[arrLeft.length] = arrAll[ifx-1][ify];218 if(ifx-2>=0){//Èç¹û×ó²àµÚÒ»¸öÏàͬÔÙÈ¡µÚ¶þ¸ö£¬µ±È»²»¹ýÄܱ߽ç0219 var l2 = findColor(ifx-2,ify);220 if(l1==l2)221 arrLeft[arrLeft.length] = arrAll[ifx-2][ify];222 }223 }224 }225 226 if(ifx+1<7){//ÓÒ²àͬÀí227 var r1 = findColor(ifx+1,ify)228 if(r1==colorI){229 arrLeft[arrLeft.length] = arrAll[ifx+1][ify];230 if(ifx+2<7){231 var r2 = findColor(ifx+2,ify);232 if(r1==r2)233 arrLeft[arrLeft.length] = arrAll[ifx+2][ify];234 }235 }236 }237 238 if(ify-1>=0){//Éϲà239 var t1 = findColor(ifx,ify-1);240 if(t1==colorI){241 arrbottom[arrbottom.length] = arrAll[ifx][ify-1];242 if(ify-2>=0){243 var t2 = findColor(ifx,ify-2);244 if(t1==t2)245 arrbottom[arrbottom.length] = arrAll[ifx][ify-2];246 }247 }248 }249 250 if(ify+1<7){//ϲà251 var b1 = findColor(ifx,ify+1);252 if(b1==colorI){253 arrbottom[arrbottom.length] = arrAll[ifx][ify+1];254 if(ify+2<7){255 var b2 = findColor(ifx,ify+2);256 if(b1==b2)257 arrbottom[arrbottom.length] = arrAll[ifx][ify+2];258 }259 }260 }261 262 if(arrLeft.length>1&&arrbottom.length>1){263 for(var k=0;k<arrbottom.length;k++){264 arrLeft[arrLeft.length] = arrbottom[k];265 }266 arrLeft[arrLeft.length] = obj;//ͬʱ±ðÍüÁ˼ÓÉÏÔ­À´µÄdiv267 return arrLeft;268 }else if(arrLeft.length>1||arrbottom.length>1){269 if(arrLeft.length>1){270 arrLeft[arrLeft.length] = obj;271 return arrLeft;272 }else{273 arrbottom[arrbottom.length] = obj;274 return arrbottom;275 }276 }else{277 return [];278 }279}280function findColor(ix,iy){//°´Î»Öõõ½±³¾°É«281 return arrAll[ix][iy].style.backgroundImage;282}283function findIndex(obj){284 for(var i=0;i<7;i++){285 for(var j=0;j<7;j++){286 if(obj===arrAll[i][j]){287 return {ri:i,rj:j};288 }289 }290 }291};292function fillAllArr(){//²¹ÆëËùÓÐȱʧÊý×é293 for(var i=0;i<7;i++){294 if(arrAll[i].length<7){//ÊÇ·ñȱʧ295 for(var k=0;k<arrAll[i].length;k++){//ÏȶÔÆëÊ£ÓàµÄdiv296 arrAll[i][k].style.bottom = k*49 +"px";297 }298 while(arrAll[i].length<7){//ÔÙ²¹Æëdiv299 var j = arrAll[i].length;300 var oDiv = createDiv(i*49,j*49);301 $("mainDiv").appendChild(oDiv);302 arrAll[i][j] = oDiv;303 }304 }305 }306}...

Full Screen

Full Screen

index.js

Source:index.js Github

copy

Full Screen

1import Vue from 'vue'2import VueRouter from 'vue-router'3import { getIsLogin } from "network/login";4// 使用路由懒加载导入组件,注意没有大括号5const Home = () =>6 import ("views/home/Home");7const ClassIfy = () =>8 import ("views/classify/ClassIfy");9const FileMe = () =>10 import ("views/fileme/FileMe");11const Login = () =>12 import ("views/login/Login");13const Photo = () =>14 import ("views/photo/Photo");15const Time = () =>16 import ("views/time/Time");17const Details = () =>18 import ("views/details/Details");19const BackStage = () =>20 import ("views/backstage/Backstage");21const Article = () =>22 import ("views/backstage/article/Article");23const ArticleClassIfy = () =>24 import ("views/backstage/articleclassify/ArticleClassIfy");25const Friend = () =>26 import ("views/backstage/friend/Friend");27const PhotoInfo = () =>28 import ("views/backstage/photoinfo/PhotoInfo");29const WriteArticle = () =>30 import ("views/backstage/writearticle/WriteArticle");31const SetArticle = () =>32 import ("views/backstage/setarticle/SetArticle");33const addClassIfy = () =>34 import ("views/backstage/addclassify/addClassIfy");35const setClassIfy = () =>36 import ("views/backstage/setclassify/setClassIfy");37const Search = () =>38 import ("views/search/Search");39const To404 = () =>40 import ("views/To404/To404");41Vue.use(VueRouter)42//定义路由规则43const routes = [44 { path: '/', redirect: 'Home' },45 { path: '/home', component: Home },46 { path: '/time', component: Time },47 { path: '/photo', component: Photo },48 { path: '/fileme', component: FileMe },49 { path: '/login', component: Login },50 { path: '/classify', component: ClassIfy },51 { path: '/search/:cont', component: Search },52 { path: '/details/:id', component: Details },53 { path: '*', component: To404 },54 {55 path: '/admin',56 component: BackStage,57 children: [58 { path: '/', redirect: 'Article' },59 { path: 'article', component: Article },60 { path: 'articleclassify', component: ArticleClassIfy },61 { path: 'friend', component: Friend },62 { path: 'photoinfo', component: PhotoInfo },63 { path: 'writearticle', component: WriteArticle },64 { path: 'setarticle/:id', component: SetArticle, },65 { path: 'addclassify', component: addClassIfy, },66 { path: 'setclassify/:id', component: setClassIfy, },67 ]68 },69]70const router = new VueRouter({71 mode: 'hash',72 base: process.env.BASE_URL,73 routes74});75//使用路由守卫,监听每一次路由的跳转,当发现当前跳转到了login页面,就进行判断76router.beforeEach(async(to, from, next) => {77 if (to.path == '/login') {78 //使用浏览器本地存储79 let username = localStorage.getItem('user');80 if (username == undefined) {81 next();82 }83 //使用axios发送一个请求到后端,后端返回true or false,来判断该用户是否登入了84 var isLogin = await getIsLogin({ username });85 if (isLogin.data) {86 //登入了直接进入后台87 console.log('已登入:', isLogin);88 router.replace("/admin").catch((err) => err);89 } else {90 //未登入进入登入页面91 console.log('未登入:', isLogin);92 next();93 }94 } else {95 next();96 }97});...

Full Screen

Full Screen

numbers.js

Source:numbers.js Github

copy

Full Screen

...31 expect(theory.num.is(true)).to.be(false);32 expect(theory.num.is(function(){})).to.be(false);33 });34 it('ify',function(){35 expect(theory.num('asdf').ify()).to.be(undefined);36 expect(theory.num.ify('asdf')).to.be(undefined);37 expect(theory.num(0).ify()).to.be(0);38 expect(theory.num.ify(0)).to.be(0);39 expect(theory.num(1).ify()).to.be(1);40 expect(theory.num.ify(1)).to.be(1);41 expect(theory.num(-1).ify()).to.be(-1);42 expect(theory.num.ify(-1)).to.be(-1);43 expect(theory.num('0').ify()).to.be(0);44 expect(theory.num.ify('0')).to.be(0);45 expect(theory.num('1').ify()).to.be(1);46 expect(theory.num.ify('1')).to.be(1);47 expect(theory.num('-1').ify()).to.be(-1);48 expect(theory.num.ify('-1')).to.be(-1);49 expect(theory.num('10').ify()).to.be(10);50 expect(theory.num.ify('10')).to.be(10);51 expect(theory.num('01').ify()).to.be(1);52 expect(theory.num.ify('01')).to.be(1);53 expect(theory.num('37.91').ify()).to.be(37.91);54 expect(theory.num.ify('37.91')).to.be(37.91);55 expect(theory.num('-7.3').ify()).to.be(-7.3);56 expect(theory.num.ify('-7.3')).to.be(-7.3);57 expect(theory.num('A14C').ify()).to.be(14);58 expect(theory.num.ify('A14C')).to.be(14);59 expect(theory.num('A14C2').ify()).to.be(14);60 expect(theory.num.ify('A14C2')).to.be(14);61 expect(theory.num('A2.1,2').ify()).to.be(2.1);62 expect(theory.num.ify('A2.1,2')).to.be(2.1);63 });64 it('ify []',function(){65 expect(theory.num(0).ify([])).to.eql([0]);66 expect(theory.num.ify(0,[])).to.eql([0]);67 expect(theory.num(1).ify([])).to.eql([1]);68 expect(theory.num.ify(1,[])).to.eql([1]);69 expect(theory.num('0').ify([])).to.eql([0]);70 expect(theory.num.ify('0',[])).to.eql([0]);71 expect(theory.num('A14C').ify([])).to.eql([14]);72 expect(theory.num.ify('A14C',[])).to.eql([14]);73 expect(theory.num('A14C2').ify([])).to.eql([14,2]);74 expect(theory.num.ify('A14C2',[])).to.eql([14,2]);75 expect(theory.num('A0.4C45,-100. Z 0032 - 5').ify([])).to.eql([0.4,45,-100,32,5]);76 expect(theory.num.ify('A0.4C45,-100. Z 0032 - 5',[])).to.eql([0.4,45,-100,32,5]);77 });78 it('random',function(){79 expect(theory.num.r().toString().length).to.be(6);80 expect(theory.num(11).r().toString().length).to.be(11);81 expect(theory.num.r([10,99]).toString().length).to.be(2);82 expect(theory.num([-99,-10]).r().toString().length).to.be(3);83 });84 });85 return 42; ...

Full Screen

Full Screen

speed.js

Source:speed.js Github

copy

Full Screen

...17 output.push(x + 2);18 });19 return output;20 });21 JSLitmus.test('sloth.ify().each()', function() {22 var output = [];23 sloth.ify(numbers).each(function(x) {24 output.push(x + 2);25 });26 return output;27 });28 JSLitmus.test('underscore.reduce()', function() {29 return _.reduce(numbers, function(acc, x) {30 return acc + x;31 }, 10);32 });33 JSLitmus.test('sloth.ify().foldl()', function() {34 return sloth.ify(numbers)35 .foldl(function(acc, x) {36 return acc + x;37 }, 10);38 });39 JSLitmus.test('underscore.reduceRight()', function() {40 return _.reduceRight(numbers, function(acc, x) {41 return acc + x;42 }, 10);43 });44 JSLitmus.test('sloth.ify().foldr()', function() {45 return sloth.ify(numbers)46 .foldr(function(x, acc) {47 return acc + x;48 }, 10);49 });50 JSLitmus.test('underscore.uniq()', function() {51 return _.uniq(randoms);52 });53 JSLitmus.test('sloth.ify().nub()', function() {54 return sloth.ify(randoms)55 .nub()56 .force();57 });58 JSLitmus.test('underscore.intersection()', function() {59 return _.intersection(randoms, randoms2);60 });61 JSLitmus.test('sloth.ify().intersect()', function() {62 return sloth.ify(randoms)63 .intersect(sloth.ify(randoms2).next)64 .force();65 });66 JSLitmus.test('underscore.union()', function() {67 return _.union(randoms, randoms2);68 });69 JSLitmus.test('sloth.ify().union()', function() {70 return sloth.ify(randoms)71 .union(sloth.ify(randoms2).next)72 .force();73 });74 JSLitmus.test('underscore.zip()', function() {75 return _.zip(randoms, randoms2);76 });77 JSLitmus.test('sloth.ify().zip()', function() {78 return sloth.ify(randoms)79 .zip(sloth.ify(randoms2).next)80 .force();81 });82 JSLitmus.test('underscore.map().max()', function() {83 return _.max(_.map(randoms, function(x) { return x + 1; }));84 });85 JSLitmus.test('sloth.ify().map().max()', function() {86 return sloth.ify(randoms)87 .map(function(x) { return x + 1; })88 .max();89 });90 JSLitmus.test('underscore.map().filter().reduce()', function() {91 return _.reduce(_.filter(_.map(numbers, function(x) {92 return x + 1;93 }), function(x) {94 return x > 200;95 }), function(acc, x) {96 return acc + x;97 }, 10);98 });99 JSLitmus.test('sloth.ify().map().filter().foldl()', function() {100 return sloth.ify(numbers)101 .map(function(x) {102 return x + 1;103 })104 .filter(function(x) {105 return x > 200;106 })107 .foldl(function(acc, x) {108 return acc + x;109 });110 });...

Full Screen

Full Screen

space.js

Source:space.js Github

copy

Full Screen

...11 data.get(function(soul){12 if(!soul){13 return cb && cb({err: "Indexspace cannot link `undefined`!"});14 }15 gun.space(key, Gun.val.link.ify(soul), opt);16 }, true);17 return gun;18 }19 var cb = (opt instanceof Function && opt), rank = (opt||empty).rank || opt, root = gun.back(-1), tmp;20 gun.get(function(soul){21 if(!soul){22 soul = (gun.back('opt.uuid') || Gun.text.random)(9);23 }24 /*var space = ify({}, soul), sub = space, l = 0, tmp;25 var atom = Gun.text.ify({get: key, put: data});26 Gun.list.map(index(0, key.length), function(i){27 sub[(tmp = key.slice(l, i))+'"'] = atom;28 sub = sub[tmp] = ify({}, soul+'"'+key.slice(0,i));29 l = i;30 });31 tmp = {}; tmp[key] = atom.put; tmp = ify(tmp, soul+'"');32 sub[key.slice(l, key.length)] = tmp;33 console.log('????', space);*/34 var shell = {}, l = 0, tmp;35 var atom = Gun.text.ify({get: key, put: data});36 tmp = {}; tmp[key] = data;37 shell.$ = ify(tmp, soul);38 tmp = {}; tmp[key.slice(0,l = 1)] = atom;39 shell[0] = ify(tmp, soul+'"');40 Gun.list.map(index(1, key.length), function(i){41 tmp = {}; tmp[key.slice(l,i)] = atom;42 shell[i] = ify(tmp, soul+'"'+key.slice(0,l));43 l = i;44 });45 tmp = {}; tmp[key.slice(l, key.length)] = atom;46 shell[l+1] = ify(tmp, soul+'"'+key.slice(0,l));47 //tmp = {}; tmp[key.slice(l, key.length)] = Gun.val.link.ify(soul); shell[l+1] = ify(tmp, soul+'"'+key.slice(0,l));48 //console.log('???', shell);49 gun.put(shell, cb, {soul: soul, shell: shell});50 },true);51 return gun;52 }53 function travel(key, cb, opt, ref){54 var root = ref.back(-1), tmp;55 opt = opt || {};56 opt.ack = opt.ack || {};57 ref.get(function(soul){58 ref.get(key).get(function(msg, eve){59 eve.off();60 opt.exact = true;61 opt.ack.key = key;62 opt.ack.data = msg.put;63 if(opt.match){ cb(opt.ack, key, msg, eve) }64 });65 //if(u !== msg.put){66 // cb(msg.put, msg.get, msg, eve);67 // return;68 //}69 opt.soul = soul;70 opt.start = soul+'"';71 opt.key = key;72 opt.top = index(0, opt.find);73 opt.low = opt.top.reverse();74 find(opt, cb, root);75 }, true);76 }77 function find(o, cb, root){78 var id = o.start+o.key.slice(0,o.low[0]);79 root.get(id).get(function(msg, eve){80 eve.off();81 o.ack.tree = {};82 if(u === msg.put){83 if(!o.exact){ return o.match = true }84 cb(o.ack, id, msg, eve);85 return;86 o.low = o.low.slice(1);87 if(!o.low.length){88 cb(u, o.key, msg, eve);89 return;90 }91 find(o, cb, root);92 return;93 }94 Gun.node.is(msg.put, function(v,k){95 if(!(k = Gun.obj.ify(v) || empty).get){ return }96 o.ack.tree[k.get] = k.put;97 });98 if(!o.exact){ return o.match = true }99 cb(o.ack, id, msg, eve);100 });101 }102 function index(n, m, l, k){103 l = l || [];104 if(!m){ return l }105 k = Math.ceil((n||1) / 10);106 if((n+k) >= m){ return l }107 l.push(n + k);108 return index(n + k, m, l);109 }...

Full Screen

Full Screen

strings.js

Source:strings.js Github

copy

Full Screen

...28 expect(theory.text.is({a:1})).to.be(false);29 expect(theory.text.is(function(){})).to.be(false);30 });31 it('ify',function(){32 expect(theory.text(0).ify()).to.be('0');33 expect(theory.text.ify(0)).to.be('0');34 expect(theory.text(22).ify()).to.be('22');35 expect(theory.text.ify(22)).to.be('22');36 expect(theory.text([true,33,'yay']).ify()).to.be('[true,33,"yay"]');37 expect(theory.text.ify([true,33,'yay'])).to.be('[true,33,"yay"]');38 expect(theory.text({a:0,b:'1',c:[0,'1'],d:{e:'f'}}).ify()).to.be('{"a":0,"b":"1","c":[0,"1"],"d":{"e":"f"}}');39 expect(theory.text.ify({a:0,b:'1',c:[0,'1'],d:{e:'f'}})).to.be('{"a":0,"b":"1","c":[0,"1"],"d":{"e":"f"}}');40 expect(theory.text(false).ify()).to.be('false');41 expect(theory.text.ify(false)).to.be('false');42 expect(theory.text(true).ify()).to.be('true');43 expect(theory.text.ify(true)).to.be('true');44 });45 it('random',function(){46 expect(theory.text.r().length).to.be(16);47 expect(theory.text(11).r().length).to.be(11);48 expect(theory.text.r(4).length).to.be(4);49 t.tr = theory.text.r(2,'as'); expect((t.tr=='as'||t.tr=='aa'||t.tr=='sa'||t.tr=='ss')).to.be.ok();50 t.tr = theory.text.random('as',2); expect((t.tr=='as'||t.tr=='aa'||t.tr=='sa'||t.tr=='ss')).to.be.ok();51 t.tr = theory.text(2).random('as'); expect((t.tr=='as'||t.tr=='aa'||t.tr=='sa'||t.tr=='ss')).to.be.ok();52 t.tr = theory.text('as').random(2); expect((t.tr=='as'||t.tr=='aa'||t.tr=='sa'||t.tr=='ss')).to.be.ok();53 });54 it('clip',function(){55 expect(theory.text('A B C D').clip(' ',0,-1)).to.be('A B C');56 expect(theory.text.clip('A B C D',' ',0,-1)).to.be('A B C');57 expect(theory.text("path/to/awesome.js").clip('.',-1)).to.be('js'); ...

Full Screen

Full Screen

Using AI Code Generation

copy

Full Screen

1var webdriver = require('selenium-webdriver'),2 until = webdriver.until;3var driver = new webdriver.Builder()4 .forBrowser('chrome')5 .build();6driver.findElement(By.name('q')).sendKeys('webdriver');7driver.findElement(By.name('btnG')).click();8driver.wait(until.titleIs('webdriver - Google Search'), 1000);9driver.quit();10var webdriver = require('selenium-webdriver'),11 until = webdriver.until;12var driver = new webdriver.Builder()13 .forBrowser('chrome')14 .build();15driver.findElement(By.name('q')).sendKeys('webdriver');16driver.findElement(By.name('btnG')).click();17driver.wait(until.titleIs('webdriver - Google Search'), 1000);18driver.quit();19var webdriver = require('selenium-webdriver'),20 until = webdriver.until;21var driver = new webdriver.Builder()22 .forBrowser('chrome')23 .build();24driver.findElement(By.name('q')).sendKeys('webdriver');25driver.findElement(By.name('btnG')).click();26driver.wait(until.titleIs('webdriver - Google Search'), 1000);27driver.quit();28var webdriver = require('selenium-webdriver'),29 until = webdriver.until;30var driver = new webdriver.Builder()31 .forBrowser('chrome')32 .build();33driver.findElement(By.name('q')).sendKeys('webdriver');34driver.findElement(By.name('btnG')).click();35driver.wait(until.titleIs('webdriver - Google Search'), 1000);36driver.quit();37var webdriver = require('selenium-webdriver'),38 until = webdriver.until;39var driver = new webdriver.Builder()40 .forBrowser('chrome')41 .build();42driver.findElement(By.name('q')).sendKeys('webdriver');43driver.findElement(By.name('btnG')).click();44driver.wait(until.titleIs('webdriver - Google Search'), 100

Full Screen

Using AI Code Generation

copy

Full Screen

1var wd = require('wd');2var asserters = wd.asserters;3var chai = require('chai');4var chaiAsPromised = require('chai-as-promised');5chai.use(chaiAsPromised);6var should = chai.should();7var expect = chai.expect;8var driver = wd.promiseChainRemote('localhost', 4723);9var desiredCaps = {10};11driver.init(desiredCaps)12 .setImplicitWaitTimeout(5000)13 .then(function () {14 return driver.elementByName('Add Contact');15 })16 .then(function (el) {17 return el.click();18 })19 .then(function () {20 return driver.elementByName('Save');21 })22 .then(function (el) {23 return el.isEnabled();24 })25 .then(function (isEnabled) {26 isEnabled.should.be.false;27 })28 .fin(function () {29 return driver.quit();30 })31 .done();

Full Screen

Using AI Code Generation

copy

Full Screen

1var wd = require('wd');2var asserters = wd.asserters;3var serverConfigs = {4};5var desiredCaps = {6};7var driver = wd.promiseChainRemote(serverConfigs);8driver.init(desiredCaps)9 .then(function () {10 .elementById('io.appium.android.apis:id/drag_dot_1')11 .then(function (el) {12 .touchAction([13 { action: 'press', options: { element: el } },14 { action: 'moveTo', options: { x: 100, y: 100 } },15 })16 .sleep(5000)17 .elementById('io.appium.android.apis:id/drag_dot_2')18 .then(function (el) {19 .touchAction([20 { action: 'press', options: { element: el } },21 { action: 'moveTo', options: { x: 100, y: 100 } },22 })23 .sleep(5000)24 .elementById('io.appium.android.apis:id/drag_dot_3')25 .then(function (el) {26 .touchAction([27 { action: 'press', options: { element: el } },28 { action: 'moveTo', options: { x: 100, y: 100 } },29 })30 .sleep(5000)31 .elementById('io.appium.android.apis:id/drag_dot_4')32 .then(function (el) {33 .touchAction([34 { action: 'press', options: { element: el } },35 { action: 'moveTo', options: { x: 100, y: 100 } },36 })37 .sleep(5000)38 .elementById('io.appium.android.apis:id/drag_dot_

Full Screen

Using AI Code Generation

copy

Full Screen

1var ify = require('ify');2var wd = require('wd');3var assert = require('assert');4var serverConfigs = {5};6var desiredCaps = {7};8describe('Appium', function() {9 this.timeout(300000);10 var driver;11 before(function() {12 driver = wd.promiseChainRemote(serverConfigs);13 ify.configure({ driver: driver });14 return driver.init(desiredCaps);15 });16 after(function() {17 return driver.quit();18 });19 it('should do something', function() {20 .elementByName('Some element name')21 .click()22 .elementByName('Another element name')23 .click()24 .elementByName('Yet another element name')25 .click()26 .elementByName('Final element name')27 .click()28 .elementByName('Final element name')29 .text()30 .should.become('Final element text');31 });32});33var ify = require('ify');34var wd = require('wd');35var assert = require('assert');36var serverConfigs = {37};38var desiredCaps = {39};40describe('Appium', function() {41 this.timeout(300000);42 var driver;43 before(function() {44 driver = wd.promiseChainRemote(serverConfigs);45 ify.configure({ driver: driver });46 return driver.init(desiredCaps);47 });48 after(function() {49 return driver.quit();50 });51 it('should do something', function() {52 .elementByName('Some element name')53 .click()54 .elementByName('Another element name')55 .click()56 .elementByName('Yet another element name')57 .click()58 .elementByName('Final element name')59 .click()60 .elementByName('Final element name')61 .text()62 .should.become('Final element text');63 });64});

Full Screen

Using AI Code Generation

copy

Full Screen

1var ify = require('appiumify').ify;2var wd = require('wd');3var assert = require('assert');4var desired = {5};6var driver = wd.remote('localhost', 4723);7 .init(desired)8 .elementByAccessibilityId('IntegerA').sendKeys(1).sleep(1000)9 .elementByAccessibilityId('IntegerB').sendKeys(2).sleep(1000)10 .elementByAccessibilityId('ComputeSumButton').click().sleep(1000)11 .elementByAccessibilityId('Answer').text().then(function (text) {12 assert.equal(text, "3");13 })14 .fin(function () { return driver.quit(); })15 .done();16The MIT License (MIT)

Full Screen

Using AI Code Generation

copy

Full Screen

1var Appium = require('appium');2var appium = new Appium();3appium.start(function(err, sessionID) {4 if (err) { return console.error(err); }5 console.log('Appium started with session id', sessionID);6 appium.stop(sessionID, function(err) {7 if (err) { return console.error(err); }8 console.log('Appium stopped');9 });10});11var Appium = require('appium');12var appium = new Appium();13appium.start(function(err, sessionID) {14 if (err) { return console.error(err); }15 console.log('Appium started with session id', sessionID);16 appium.stop(sessionID, function(err) {17 if (err) { return console.error(err); }18 console.log('Appium stopped');19 });20});

Full Screen

Automation Testing Tutorials

Learn to execute automation testing from scratch with LambdaTest Learning Hub. Right from setting up the prerequisites to run your first automation test, to following best practices and diving deeper into advanced test scenarios. LambdaTest Learning Hubs compile a list of step-by-step guides to help you be proficient with different test automation frameworks i.e. Selenium, Cypress, TestNG etc.

LambdaTest Learning Hubs:

YouTube

You could also refer to video tutorials over LambdaTest YouTube channel to get step by step demonstration from industry experts.

Run Appium automation tests on LambdaTest cloud grid

Perform automation testing on 3000+ real desktop and mobile devices online.

Try LambdaTest Now !!

Get 100 minutes of automation test minutes FREE!!

Next-Gen App & Browser Testing Cloud

Was this article helpful?

Helpful

NotHelpful