How to use types method in wpt

Best JavaScript code snippet using wpt

seed.js

Source:seed.js Github

copy

Full Screen

1var seeder = require('mongoose-seed');2var mongoose = require('mongoose');3// Connect to MongoDB via Mongoose4seeder.connect('mongodb+srv://rkhisyam:0HJABFAtIJ9LBnxA@cluster0.qelpe.mongodb.net/db_staycation?retryWrites=true&w=majority', {5 useNewUrlParser: true,6 useCreateIndex: true,7 useFindAndModify: true,8 useUnifiedTopology: true9}, function () {10 // Load Mongoose models11 seeder.loadModels([12 './models/Category',13 './models/Bank',14 './models/Item',15 './models/Feature',16 './models/Activity',17 './models/Member',18 './models/Image',19 './models/Member',20 './models/Booking',21 './models/User'22 ]);23 // Clear specified collections24 seeder.clearModels(['Category', 'Bank', 'Item', 'Member', 'Item', 'Feature', 'Image', 'Booking', 'User'], function () {25 // Callback to populate DB once collections have been cleared26 seeder.populateModels(data, function () {27 seeder.disconnect();28 });29 });30});31var data = [32 // start category33 {34 'model': 'Category',35 'documents': [36 {37 _id: mongoose.Types.ObjectId('5e96cbe292b97300fc901111'),38 name: 'Houses with beauty backyard',39 itemId: [40 { _id: mongoose.Types.ObjectId('5e96cbe292b97300fc902222') },41 { _id: mongoose.Types.ObjectId('5e96cbe292b97300fc902223') },42 { _id: mongoose.Types.ObjectId('5e96cbe292b97300fc902224') },43 { _id: mongoose.Types.ObjectId('5e96cbe292b97300fc902225') }44 ]45 },46 {47 _id: mongoose.Types.ObjectId('5e96cbe292b97300fc901112'),48 name: 'Hotels with large living room',49 itemId: [50 { _id: mongoose.Types.ObjectId('5e96cbe292b97300fc902226') },51 { _id: mongoose.Types.ObjectId('5e96cbe292b97300fc902227') },52 { _id: mongoose.Types.ObjectId('5e96cbe292b97300fc902228') },53 { _id: mongoose.Types.ObjectId('5e96cbe292b97300fc902229') }54 ]55 },56 {57 _id: mongoose.Types.ObjectId('5e96cbe292b97300fc901113'),58 name: 'Apartment with kitchen',59 itemId: [60 { _id: mongoose.Types.ObjectId('5e96cbe292b97300fc902230') },61 { _id: mongoose.Types.ObjectId('5e96cbe292b97300fc902231') },62 { _id: mongoose.Types.ObjectId('5e96cbe292b97300fc902232') },63 { _id: mongoose.Types.ObjectId('5e96cbe292b97300fc902233') }64 ]65 }66 ]67 },68 // end category69 // start item70 {71 'model': 'Item',72 'documents': [73 // Tabby Town74 {75 _id: mongoose.Types.ObjectId('5e96cbe292b97300fc902222'),76 title: 'Tabby Town',77 price: 12,78 sumBooking: 1,79 country: 'Indonesia',80 city: 'Lampung',81 isPopular: false,82 description: 'Minimal techno is a minimalist subgenre of techno music. It is characterized by a stripped-down aesthetic that exploits the use of repetition and understated development. Minimal techno is thought to have been originally developed in the early 1990s by Detroit-based producers Robert Hood and Daniel Bell.',83 unit: 'night',84 imageId: [85 // done86 { _id: mongoose.Types.ObjectId('5e96cbe292b97300fc90cdb1') },87 // done88 { _id: mongoose.Types.ObjectId('5e96cbe292b97300fc90cdb2') },89 // done90 { _id: mongoose.Types.ObjectId('5e96cbe292b97300fc90cdb3') }91 ],92 featureId: [93 // done94 { _id: mongoose.Types.ObjectId('5e96cbe292b97300fc90aa09') },95 // done96 { _id: mongoose.Types.ObjectId('5e96cbe292b97300fc90aa10') },97 // done98 { _id: mongoose.Types.ObjectId('5e96cbe292b97300fc90aa11') },99 // done100 { _id: mongoose.Types.ObjectId('5e96cbe292b97300fc90aa12') },101 // done102 { _id: mongoose.Types.ObjectId('5e96cbe292b97300fc90aa13') },103 // done104 { _id: mongoose.Types.ObjectId('5e96cbe292b97300fc90aa14') },105 // done106 { _id: mongoose.Types.ObjectId('5e96cbe292b97300fc90aa15') },107 // done108 { _id: mongoose.Types.ObjectId('5e96cbe292b97300fc90aa16') }109 ],110 activityId: [111 { _id: mongoose.Types.ObjectId('5e96cbe292b97300fc90bb05') },112 { _id: mongoose.Types.ObjectId('5e96cbe292b97300fc90bb06') },113 { _id: mongoose.Types.ObjectId('5e96cbe292b97300fc90bb07') },114 { _id: mongoose.Types.ObjectId('5e96cbe292b97300fc90bb08') }115 ],116 categoryId: '5e96cbe292b97300fc901111'117 },118 // Seattle Rain119 {120 // done121 _id: mongoose.Types.ObjectId('5e96cbe292b97300fc902223'),122 title: 'Seattle Rain',123 price: 20,124 sumBooking: 2,125 country: 'Indonesia',126 city: 'Bandung',127 isPopular: false,128 description: 'Minimal techno is a minimalist subgenre of techno music. It is characterized by a stripped-down aesthetic that exploits the use of repetition and understated development. Minimal techno is thought to have been originally developed in the early 1990s by Detroit-based producers Robert Hood and Daniel Bell.',129 unit: 'night',130 imageId: [131 // done132 { _id: mongoose.Types.ObjectId('5e96cbe292b97300fc90cdb4') },133 // done134 { _id: mongoose.Types.ObjectId('5e96cbe292b97300fc90cdb5') },135 // done136 { _id: mongoose.Types.ObjectId('5e96cbe292b97300fc90cdb6') }137 ],138 featureId: [139 // done140 { _id: mongoose.Types.ObjectId('5e96cbe292b97300fc90aa01') },141 // done142 { _id: mongoose.Types.ObjectId('5e96cbe292b97300fc90aa02') },143 // done144 { _id: mongoose.Types.ObjectId('5e96cbe292b97300fc90aa03') },145 // done146 { _id: mongoose.Types.ObjectId('5e96cbe292b97300fc90aa04') },147 // done148 { _id: mongoose.Types.ObjectId('5e96cbe292b97300fc90aa05') },149 // done150 { _id: mongoose.Types.ObjectId('5e96cbe292b97300fc90aa06') },151 // done152 { _id: mongoose.Types.ObjectId('5e96cbe292b97300fc90aa07') },153 // done154 { _id: mongoose.Types.ObjectId('5e96cbe292b97300fc90aa08') }155 ],156 activityId: [157 { _id: mongoose.Types.ObjectId('5e96cbe292b97300fc90bb01') },158 { _id: mongoose.Types.ObjectId('5e96cbe292b97300fc90bb02') },159 { _id: mongoose.Types.ObjectId('5e96cbe292b97300fc90bb03') },160 { _id: mongoose.Types.ObjectId('5e96cbe292b97300fc90bb04') }161 ],162 categoryId: '5e96cbe292b97300fc901111'163 },164 // Wodden Pit165 {166 _id: mongoose.Types.ObjectId('5e96cbe292b97300fc902224'),167 title: 'Wodden Pit',168 price: 20,169 sumBooking: 3,170 country: 'Indonesia',171 city: 'Bandung',172 isPopular: false,173 description: 'Minimal techno is a minimalist subgenre of techno music. It is characterized by a stripped-down aesthetic that exploits the use of repetition and understated development. Minimal techno is thought to have been originally developed in the early 1990s by Detroit-based producers Robert Hood and Daniel Bell.',174 unit: 'night',175 imageId: [176 // done177 { _id: mongoose.Types.ObjectId('5e96cbe292b97300fc90cdb7') },178 // done179 { _id: mongoose.Types.ObjectId('5e96cbe292b97300fc90cdb8') },180 // done181 { _id: mongoose.Types.ObjectId('5e96cbe292b97300fc90cdb9') }182 ],183 featureId: [184 // done185 { _id: mongoose.Types.ObjectId('5e96cbe292b97300fc90aa01') },186 // done187 { _id: mongoose.Types.ObjectId('5e96cbe292b97300fc90aa02') },188 // done189 { _id: mongoose.Types.ObjectId('5e96cbe292b97300fc90aa03') },190 // done191 { _id: mongoose.Types.ObjectId('5e96cbe292b97300fc90aa04') },192 // done193 { _id: mongoose.Types.ObjectId('5e96cbe292b97300fc90aa05') },194 // done195 { _id: mongoose.Types.ObjectId('5e96cbe292b97300fc90aa06') },196 // done197 { _id: mongoose.Types.ObjectId('5e96cbe292b97300fc90aa07') },198 // done199 { _id: mongoose.Types.ObjectId('5e96cbe292b97300fc90aa08') }200 ],201 activityId: [202 { _id: mongoose.Types.ObjectId('5e96cbe292b97300fc90bb01') },203 { _id: mongoose.Types.ObjectId('5e96cbe292b97300fc90bb02') },204 { _id: mongoose.Types.ObjectId('5e96cbe292b97300fc90bb03') },205 { _id: mongoose.Types.ObjectId('5e96cbe292b97300fc90bb04') }206 ],207 categoryId: '5e96cbe292b97300fc901111'208 },209 // Anggana210 {211 _id: mongoose.Types.ObjectId('5e96cbe292b97300fc902225'),212 title: 'Anggana',213 price: 20,214 sumBooking: 4,215 country: 'Indonesia',216 city: 'Bandung',217 isPopular: false,218 description: 'Minimal techno is a minimalist subgenre of techno music. It is characterized by a stripped-down aesthetic that exploits the use of repetition and understated development. Minimal techno is thought to have been originally developed in the early 1990s by Detroit-based producers Robert Hood and Daniel Bell.',219 unit: 'night',220 imageId: [221 // done222 { _id: mongoose.Types.ObjectId('5e96cbe292b97300fc90cd10') },223 // done224 { _id: mongoose.Types.ObjectId('5e96cbe292b97300fc90cd11') },225 // done226 { _id: mongoose.Types.ObjectId('5e96cbe292b97300fc90cd12') }227 ],228 featureId: [229 // done230 { _id: mongoose.Types.ObjectId('5e96cbe292b97300fc90aa01') },231 // done232 { _id: mongoose.Types.ObjectId('5e96cbe292b97300fc90aa02') },233 // done234 { _id: mongoose.Types.ObjectId('5e96cbe292b97300fc90aa03') },235 // done236 { _id: mongoose.Types.ObjectId('5e96cbe292b97300fc90aa04') },237 // done238 { _id: mongoose.Types.ObjectId('5e96cbe292b97300fc90aa05') },239 // done240 { _id: mongoose.Types.ObjectId('5e96cbe292b97300fc90aa06') },241 // done242 { _id: mongoose.Types.ObjectId('5e96cbe292b97300fc90aa07') },243 // done244 { _id: mongoose.Types.ObjectId('5e96cbe292b97300fc90aa08') }245 ],246 activityId: [247 { _id: mongoose.Types.ObjectId('5e96cbe292b97300fc90bb01') },248 { _id: mongoose.Types.ObjectId('5e96cbe292b97300fc90bb02') },249 { _id: mongoose.Types.ObjectId('5e96cbe292b97300fc90bb03') },250 { _id: mongoose.Types.ObjectId('5e96cbe292b97300fc90bb04') }251 ],252 categoryId: '5e96cbe292b97300fc901111'253 },254 // Green Park255 {256 _id: mongoose.Types.ObjectId('5e96cbe292b97300fc902226'),257 title: 'Green Park',258 price: 20,259 sumBooking: 5,260 country: 'Indonesia',261 city: 'Bandung',262 isPopular: false,263 description: 'Minimal techno is a minimalist subgenre of techno music. It is characterized by a stripped-down aesthetic that exploits the use of repetition and understated development. Minimal techno is thought to have been originally developed in the early 1990s by Detroit-based producers Robert Hood and Daniel Bell.',264 unit: 'night',265 imageId: [266 // done267 { _id: mongoose.Types.ObjectId('5e96cbe292b97300fc90cd13') },268 // done269 { _id: mongoose.Types.ObjectId('5e96cbe292b97300fc90cd14') },270 // done271 { _id: mongoose.Types.ObjectId('5e96cbe292b97300fc90cd15') }272 ],273 featureId: [274 // done275 { _id: mongoose.Types.ObjectId('5e96cbe292b97300fc90aa01') },276 // done277 { _id: mongoose.Types.ObjectId('5e96cbe292b97300fc90aa02') },278 // done279 { _id: mongoose.Types.ObjectId('5e96cbe292b97300fc90aa03') },280 // done281 { _id: mongoose.Types.ObjectId('5e96cbe292b97300fc90aa04') },282 // done283 { _id: mongoose.Types.ObjectId('5e96cbe292b97300fc90aa05') },284 // done285 { _id: mongoose.Types.ObjectId('5e96cbe292b97300fc90aa06') },286 // done287 { _id: mongoose.Types.ObjectId('5e96cbe292b97300fc90aa07') },288 // done289 { _id: mongoose.Types.ObjectId('5e96cbe292b97300fc90aa08') }290 ],291 activityId: [292 { _id: mongoose.Types.ObjectId('5e96cbe292b97300fc90bb01') },293 { _id: mongoose.Types.ObjectId('5e96cbe292b97300fc90bb02') },294 { _id: mongoose.Types.ObjectId('5e96cbe292b97300fc90bb03') },295 { _id: mongoose.Types.ObjectId('5e96cbe292b97300fc90bb04') }296 ],297 categoryId: '5e96cbe292b97300fc901112'298 },299 // Podo Wae300 {301 _id: mongoose.Types.ObjectId('5e96cbe292b97300fc902227'),302 title: 'Podo Wae',303 price: 20,304 sumBooking: 6,305 country: 'Indonesia',306 city: 'Bandung',307 isPopular: false,308 description: 'Minimal techno is a minimalist subgenre of techno music. It is characterized by a stripped-down aesthetic that exploits the use of repetition and understated development. Minimal techno is thought to have been originally developed in the early 1990s by Detroit-based producers Robert Hood and Daniel Bell.',309 unit: 'night',310 imageId: [311 // done312 { _id: mongoose.Types.ObjectId('5e96cbe292b97300fc90cd16') },313 // done314 { _id: mongoose.Types.ObjectId('5e96cbe292b97300fc90cd17') },315 // done316 { _id: mongoose.Types.ObjectId('5e96cbe292b97300fc90cd18') }317 ],318 featureId: [319 // done320 { _id: mongoose.Types.ObjectId('5e96cbe292b97300fc90aa01') },321 // done322 { _id: mongoose.Types.ObjectId('5e96cbe292b97300fc90aa02') },323 // done324 { _id: mongoose.Types.ObjectId('5e96cbe292b97300fc90aa03') },325 // done326 { _id: mongoose.Types.ObjectId('5e96cbe292b97300fc90aa04') },327 // done328 { _id: mongoose.Types.ObjectId('5e96cbe292b97300fc90aa05') },329 // done330 { _id: mongoose.Types.ObjectId('5e96cbe292b97300fc90aa06') },331 // done332 { _id: mongoose.Types.ObjectId('5e96cbe292b97300fc90aa07') },333 // done334 { _id: mongoose.Types.ObjectId('5e96cbe292b97300fc90aa08') }335 ],336 activityId: [337 { _id: mongoose.Types.ObjectId('5e96cbe292b97300fc90bb01') },338 { _id: mongoose.Types.ObjectId('5e96cbe292b97300fc90bb02') },339 { _id: mongoose.Types.ObjectId('5e96cbe292b97300fc90bb03') },340 { _id: mongoose.Types.ObjectId('5e96cbe292b97300fc90bb04') }341 ],342 categoryId: '5e96cbe292b97300fc901112'343 },344 // Silver Rain345 {346 _id: mongoose.Types.ObjectId('5e96cbe292b97300fc902228'),347 title: 'Silver Rain',348 price: 20,349 sumBooking: 7,350 country: 'Indonesia',351 city: 'Bandung',352 isPopular: false,353 description: 'Minimal techno is a minimalist subgenre of techno music. It is characterized by a stripped-down aesthetic that exploits the use of repetition and understated development. Minimal techno is thought to have been originally developed in the early 1990s by Detroit-based producers Robert Hood and Daniel Bell.',354 unit: 'night',355 imageId: [356 // done357 { _id: mongoose.Types.ObjectId('5e96cbe292b97300fc90cd19') },358 // done359 { _id: mongoose.Types.ObjectId('5e96cbe292b97300fc90cd20') },360 // done361 { _id: mongoose.Types.ObjectId('5e96cbe292b97300fc90cd21') }362 ],363 featureId: [364 // done365 { _id: mongoose.Types.ObjectId('5e96cbe292b97300fc90aa01') },366 // done367 { _id: mongoose.Types.ObjectId('5e96cbe292b97300fc90aa02') },368 // done369 { _id: mongoose.Types.ObjectId('5e96cbe292b97300fc90aa03') },370 // done371 { _id: mongoose.Types.ObjectId('5e96cbe292b97300fc90aa04') },372 // done373 { _id: mongoose.Types.ObjectId('5e96cbe292b97300fc90aa05') },374 // done375 { _id: mongoose.Types.ObjectId('5e96cbe292b97300fc90aa06') },376 // done377 { _id: mongoose.Types.ObjectId('5e96cbe292b97300fc90aa07') },378 // done379 { _id: mongoose.Types.ObjectId('5e96cbe292b97300fc90aa08') }380 ],381 activityId: [382 { _id: mongoose.Types.ObjectId('5e96cbe292b97300fc90bb01') },383 { _id: mongoose.Types.ObjectId('5e96cbe292b97300fc90bb02') },384 { _id: mongoose.Types.ObjectId('5e96cbe292b97300fc90bb03') },385 { _id: mongoose.Types.ObjectId('5e96cbe292b97300fc90bb04') }386 ],387 categoryId: '5e96cbe292b97300fc901112'388 },389 // Cashville390 {391 _id: mongoose.Types.ObjectId('5e96cbe292b97300fc902229'),392 title: 'Cashville',393 price: 20,394 sumBooking: 8,395 country: 'Indonesia',396 city: 'Bandung',397 isPopular: false,398 description: 'Minimal techno is a minimalist subgenre of techno music. It is characterized by a stripped-down aesthetic that exploits the use of repetition and understated development. Minimal techno is thought to have been originally developed in the early 1990s by Detroit-based producers Robert Hood and Daniel Bell.',399 unit: 'night',400 imageId: [401 // done402 { _id: mongoose.Types.ObjectId('5e96cbe292b97300fc90cd22') },403 // done404 { _id: mongoose.Types.ObjectId('5e96cbe292b97300fc90cd23') },405 // done406 { _id: mongoose.Types.ObjectId('5e96cbe292b97300fc90cd24') }407 ],408 featureId: [409 // done410 { _id: mongoose.Types.ObjectId('5e96cbe292b97300fc90aa01') },411 // done412 { _id: mongoose.Types.ObjectId('5e96cbe292b97300fc90aa02') },413 // done414 { _id: mongoose.Types.ObjectId('5e96cbe292b97300fc90aa03') },415 // done416 { _id: mongoose.Types.ObjectId('5e96cbe292b97300fc90aa04') },417 // done418 { _id: mongoose.Types.ObjectId('5e96cbe292b97300fc90aa05') },419 // done420 { _id: mongoose.Types.ObjectId('5e96cbe292b97300fc90aa06') },421 // done422 { _id: mongoose.Types.ObjectId('5e96cbe292b97300fc90aa07') },423 // done424 { _id: mongoose.Types.ObjectId('5e96cbe292b97300fc90aa08') }425 ],426 activityId: [427 { _id: mongoose.Types.ObjectId('5e96cbe292b97300fc90bb01') },428 { _id: mongoose.Types.ObjectId('5e96cbe292b97300fc90bb02') },429 { _id: mongoose.Types.ObjectId('5e96cbe292b97300fc90bb03') },430 { _id: mongoose.Types.ObjectId('5e96cbe292b97300fc90bb04') }431 ],432 categoryId: '5e96cbe292b97300fc901112'433 },434 // PS Wood435 {436 _id: mongoose.Types.ObjectId('5e96cbe292b97300fc902230'),437 title: 'PS Wood',438 price: 20,439 sumBooking: 9,440 country: 'Indonesia',441 city: 'Bandung',442 isPopular: false,443 description: 'Minimal techno is a minimalist subgenre of techno music. It is characterized by a stripped-down aesthetic that exploits the use of repetition and understated development. Minimal techno is thought to have been originally developed in the early 1990s by Detroit-based producers Robert Hood and Daniel Bell.',444 unit: 'night',445 imageId: [446 // done447 { _id: mongoose.Types.ObjectId('5e96cbe292b97300fc90cd25') },448 // done449 { _id: mongoose.Types.ObjectId('5e96cbe292b97300fc90cd26') },450 // done451 { _id: mongoose.Types.ObjectId('5e96cbe292b97300fc90cd27') }452 ],453 featureId: [454 // done455 { _id: mongoose.Types.ObjectId('5e96cbe292b97300fc90aa01') },456 // done457 { _id: mongoose.Types.ObjectId('5e96cbe292b97300fc90aa02') },458 // done459 { _id: mongoose.Types.ObjectId('5e96cbe292b97300fc90aa03') },460 // done461 { _id: mongoose.Types.ObjectId('5e96cbe292b97300fc90aa04') },462 // done463 { _id: mongoose.Types.ObjectId('5e96cbe292b97300fc90aa05') },464 // done465 { _id: mongoose.Types.ObjectId('5e96cbe292b97300fc90aa06') },466 // done467 { _id: mongoose.Types.ObjectId('5e96cbe292b97300fc90aa07') },468 // done469 { _id: mongoose.Types.ObjectId('5e96cbe292b97300fc90aa08') }470 ],471 activityId: [472 { _id: mongoose.Types.ObjectId('5e96cbe292b97300fc90bb01') },473 { _id: mongoose.Types.ObjectId('5e96cbe292b97300fc90bb02') },474 { _id: mongoose.Types.ObjectId('5e96cbe292b97300fc90bb03') },475 { _id: mongoose.Types.ObjectId('5e96cbe292b97300fc90bb04') }476 ],477 categoryId: '5e96cbe292b97300fc901113'478 },479 // One Five480 {481 _id: mongoose.Types.ObjectId('5e96cbe292b97300fc902231'),482 title: 'One Five',483 price: 20,484 sumBooking: 11,485 country: 'Indonesia',486 city: 'Bandung',487 isPopular: false,488 description: 'Minimal techno is a minimalist subgenre of techno music. It is characterized by a stripped-down aesthetic that exploits the use of repetition and understated development. Minimal techno is thought to have been originally developed in the early 1990s by Detroit-based producers Robert Hood and Daniel Bell.',489 unit: 'night',490 imageId: [491 // done492 { _id: mongoose.Types.ObjectId('5e96cbe292b97300fc90cd28') },493 // done494 { _id: mongoose.Types.ObjectId('5e96cbe292b97300fc90cd29') },495 // done496 { _id: mongoose.Types.ObjectId('5e96cbe292b97300fc90cd30') }497 ],498 featureId: [499 // done500 { _id: mongoose.Types.ObjectId('5e96cbe292b97300fc90aa01') },501 // done502 { _id: mongoose.Types.ObjectId('5e96cbe292b97300fc90aa02') },503 // done504 { _id: mongoose.Types.ObjectId('5e96cbe292b97300fc90aa03') },505 // done506 { _id: mongoose.Types.ObjectId('5e96cbe292b97300fc90aa04') },507 // done508 { _id: mongoose.Types.ObjectId('5e96cbe292b97300fc90aa05') },509 // done510 { _id: mongoose.Types.ObjectId('5e96cbe292b97300fc90aa06') },511 // done512 { _id: mongoose.Types.ObjectId('5e96cbe292b97300fc90aa07') },513 // done514 { _id: mongoose.Types.ObjectId('5e96cbe292b97300fc90aa08') }515 ],516 activityId: [517 { _id: mongoose.Types.ObjectId('5e96cbe292b97300fc90bb01') },518 { _id: mongoose.Types.ObjectId('5e96cbe292b97300fc90bb02') },519 { _id: mongoose.Types.ObjectId('5e96cbe292b97300fc90bb03') },520 { _id: mongoose.Types.ObjectId('5e96cbe292b97300fc90bb04') }521 ],522 categoryId: '5e96cbe292b97300fc901113'523 },524 // Minimal525 {526 _id: mongoose.Types.ObjectId('5e96cbe292b97300fc902232'),527 title: 'Minimal',528 price: 20,529 sumBooking: 13,530 country: 'Indonesia',531 city: 'Bandung',532 isPopular: false,533 description: 'Minimal techno is a minimalist subgenre of techno music. It is characterized by a stripped-down aesthetic that exploits the use of repetition and understated development. Minimal techno is thought to have been originally developed in the early 1990s by Detroit-based producers Robert Hood and Daniel Bell.',534 unit: 'night',535 imageId: [536 // done537 { _id: mongoose.Types.ObjectId('5e96cbe292b97300fc90cd32') },538 // done539 { _id: mongoose.Types.ObjectId('5e96cbe292b97300fc90cd31') },540 // done541 { _id: mongoose.Types.ObjectId('5e96cbe292b97300fc90cd33') }542 ],543 featureId: [544 // done545 { _id: mongoose.Types.ObjectId('5e96cbe292b97300fc90aa01') },546 // done547 { _id: mongoose.Types.ObjectId('5e96cbe292b97300fc90aa02') },548 // done549 { _id: mongoose.Types.ObjectId('5e96cbe292b97300fc90aa03') },550 // done551 { _id: mongoose.Types.ObjectId('5e96cbe292b97300fc90aa04') },552 // done553 { _id: mongoose.Types.ObjectId('5e96cbe292b97300fc90aa05') },554 // done555 { _id: mongoose.Types.ObjectId('5e96cbe292b97300fc90aa06') },556 // done557 { _id: mongoose.Types.ObjectId('5e96cbe292b97300fc90aa07') },558 // done559 { _id: mongoose.Types.ObjectId('5e96cbe292b97300fc90aa08') }560 ],561 activityId: [562 { _id: mongoose.Types.ObjectId('5e96cbe292b97300fc90bb01') },563 { _id: mongoose.Types.ObjectId('5e96cbe292b97300fc90bb02') },564 { _id: mongoose.Types.ObjectId('5e96cbe292b97300fc90bb03') },565 { _id: mongoose.Types.ObjectId('5e96cbe292b97300fc90bb04') }566 ],567 categoryId: '5e96cbe292b97300fc901113'568 },569 // Stays Home570 {571 _id: mongoose.Types.ObjectId('5e96cbe292b97300fc902233'),572 title: 'Stays Home',573 price: 20,574 sumBooking: 14,575 country: 'Indonesia',576 city: 'Bandung',577 isPopular: false,578 description: 'Minimal techno is a minimalist subgenre of techno music. It is characterized by a stripped-down aesthetic that exploits the use of repetition and understated development. Minimal techno is thought to have been originally developed in the early 1990s by Detroit-based producers Robert Hood and Daniel Bell.',579 unit: 'night',580 imageId: [581 { _id: mongoose.Types.ObjectId('5e96cbe292b97300fc90cd36') },582 // done583 { _id: mongoose.Types.ObjectId('5e96cbe292b97300fc90cd34') },584 // done585 { _id: mongoose.Types.ObjectId('5e96cbe292b97300fc90cd35') },586 // done587 ],588 featureId: [589 // done590 { _id: mongoose.Types.ObjectId('5e96cbe292b97300fc90aa01') },591 // done592 { _id: mongoose.Types.ObjectId('5e96cbe292b97300fc90aa02') },593 // done594 { _id: mongoose.Types.ObjectId('5e96cbe292b97300fc90aa03') },595 // done596 { _id: mongoose.Types.ObjectId('5e96cbe292b97300fc90aa04') },597 // done598 { _id: mongoose.Types.ObjectId('5e96cbe292b97300fc90aa05') },599 // done600 { _id: mongoose.Types.ObjectId('5e96cbe292b97300fc90aa06') },601 // done602 { _id: mongoose.Types.ObjectId('5e96cbe292b97300fc90aa07') },603 // done604 { _id: mongoose.Types.ObjectId('5e96cbe292b97300fc90aa08') }605 ],606 activityId: [607 { _id: mongoose.Types.ObjectId('5e96cbe292b97300fc90bb01') },608 { _id: mongoose.Types.ObjectId('5e96cbe292b97300fc90bb02') },609 { _id: mongoose.Types.ObjectId('5e96cbe292b97300fc90bb03') },610 { _id: mongoose.Types.ObjectId('5e96cbe292b97300fc90bb04') }611 ],612 categoryId: '5e96cbe292b97300fc901113'613 },614 ]615 },616 // end item617 // start image618 {619 'model': 'Image',620 'documents': [621 {622 // done623 _id: mongoose.Types.ObjectId('5e96cbe292b97300fc90cdb1'),624 imageUrl: 'images/image-mostpicked-1-min.jpg'625 },626 // done627 {628 _id: mongoose.Types.ObjectId('5e96cbe292b97300fc90cdb2'),629 imageUrl: 'images/image-mostpicked-2-min.jpg'630 },631 // done632 {633 _id: mongoose.Types.ObjectId('5e96cbe292b97300fc90cdb3'),634 imageUrl: 'images/image-mostpicked-3-min.jpg'635 },636 {637 _id: mongoose.Types.ObjectId('5e96cbe292b97300fc90cdb4'),638 imageUrl: 'images/image-mostpicked-4-min.jpg'639 },640 {641 _id: mongoose.Types.ObjectId('5e96cbe292b97300fc90cdb5'),642 imageUrl: 'images/item-1.png'643 },644 {645 _id: mongoose.Types.ObjectId('5e96cbe292b97300fc90cdb6'),646 imageUrl: 'images/image-mostpicked-5-min.jpg'647 },648 {649 _id: mongoose.Types.ObjectId('5e96cbe292b97300fc90cdb7'),650 imageUrl: 'images/image-mostpicked-7-min.jpg'651 },652 {653 _id: mongoose.Types.ObjectId('5e96cbe292b97300fc90cdb8'),654 imageUrl: 'images/image-mostpicked-8-min.jpg'655 },656 {657 _id: mongoose.Types.ObjectId('5e96cbe292b97300fc90cdb9'),658 imageUrl: 'images/image-mostpicked-9-min.jpg'659 },660 {661 // done662 _id: mongoose.Types.ObjectId('5e96cbe292b97300fc90cd10'),663 imageUrl: 'images/image-mostpicked-10-min.jpg'664 },665 // done666 {667 _id: mongoose.Types.ObjectId('5e96cbe292b97300fc90cd11'),668 imageUrl: 'images/image-mostpicked-11-min.jpg'669 },670 // done671 {672 _id: mongoose.Types.ObjectId('5e96cbe292b97300fc90cd12'),673 imageUrl: 'images/image-mostpicked-12-min.jpg'674 },675 {676 _id: mongoose.Types.ObjectId('5e96cbe292b97300fc90cd13'),677 imageUrl: 'images/image-mostpicked-13-min.jpg'678 },679 {680 _id: mongoose.Types.ObjectId('5e96cbe292b97300fc90cd14'),681 imageUrl: 'images/image-mostpicked-14-min.jpg'682 },683 {684 _id: mongoose.Types.ObjectId('5e96cbe292b97300fc90cd15'),685 imageUrl: 'images/image-mostpicked-15-min.jpg'686 },687 {688 _id: mongoose.Types.ObjectId('5e96cbe292b97300fc90cd16'),689 imageUrl: 'images/image-category-1-min.jpg'690 },691 {692 _id: mongoose.Types.ObjectId('5e96cbe292b97300fc90cd17'),693 imageUrl: 'images/image-category-2-min.jpg'694 },695 {696 _id: mongoose.Types.ObjectId('5e96cbe292b97300fc90cd18'),697 imageUrl: 'images/image-category-3-min.jpg'698 },699 {700 _id: mongoose.Types.ObjectId('5e96cbe292b97300fc90cd19'),701 imageUrl: 'images/image-category-4-min.jpg'702 },703 {704 _id: mongoose.Types.ObjectId('5e96cbe292b97300fc90cd20'),705 imageUrl: 'images/image-category-5-min.jpg'706 },707 {708 _id: mongoose.Types.ObjectId('5e96cbe292b97300fc90cd21'),709 imageUrl: 'images/image-category-6-min.jpg'710 },711 {712 _id: mongoose.Types.ObjectId('5e96cbe292b97300fc90cd22'),713 imageUrl: 'images/image-category-7-min.jpg'714 },715 {716 _id: mongoose.Types.ObjectId('5e96cbe292b97300fc90cd23'),717 imageUrl: 'images/image-category-8-min.jpg'718 },719 {720 _id: mongoose.Types.ObjectId('5e96cbe292b97300fc90cd24'),721 imageUrl: 'images/image-category-9-min.jpg'722 },723 {724 _id: mongoose.Types.ObjectId('5e96cbe292b97300fc90cd25'),725 imageUrl: 'images/image-category-7-min.jpg'726 },727 {728 _id: mongoose.Types.ObjectId('5e96cbe292b97300fc90cd26'),729 imageUrl: 'images/image-category-8-min.jpg'730 },731 {732 _id: mongoose.Types.ObjectId('5e96cbe292b97300fc90cd27'),733 imageUrl: 'images/image-category-9-min.jpg'734 },735 {736 _id: mongoose.Types.ObjectId('5e96cbe292b97300fc90cd28'),737 imageUrl: 'images/image-category-10-min.jpg'738 },739 {740 _id: mongoose.Types.ObjectId('5e96cbe292b97300fc90cd29'),741 imageUrl: 'images/image-category-11-min.jpg'742 },743 {744 _id: mongoose.Types.ObjectId('5e96cbe292b97300fc90cd30'),745 imageUrl: 'images/image-category-12-min.jpg'746 },747 {748 _id: mongoose.Types.ObjectId('5e96cbe292b97300fc90cd31'),749 imageUrl: 'images/image-category-13-min.jpg'750 },751 {752 _id: mongoose.Types.ObjectId('5e96cbe292b97300fc90cd32'),753 imageUrl: 'images/image-category-14-min.jpg'754 },755 {756 _id: mongoose.Types.ObjectId('5e96cbe292b97300fc90cd33'),757 imageUrl: 'images/image-category-15-min.jpg'758 },759 {760 _id: mongoose.Types.ObjectId('5e96cbe292b97300fc90cd34'),761 imageUrl: 'images/image-category-16-min.jpg'762 },763 {764 _id: mongoose.Types.ObjectId('5e96cbe292b97300fc90cd35'),765 imageUrl: 'images/image-category-17-min.jpg'766 },767 {768 _id: mongoose.Types.ObjectId('5e96cbe292b97300fc90cd36'),769 imageUrl: 'images/image-category-18-min.jpg'770 },771 ]772 },773 // end image774 // start feature775 {776 'model': 'Feature',777 'documents': [778 {779 // done780 _id: mongoose.Types.ObjectId('5e96cbe292b97300fc90aa01'),781 name: 'bedroom',782 qty: 2,783 imageUrl: 'images/feature-1.png',784 itemId: mongoose.Types.ObjectId('5e96cbe292b97300fc902222'),785 },786 {787 // done788 _id: mongoose.Types.ObjectId('5e96cbe292b97300fc90aa02'),789 name: 'living room',790 qty: 23,791 imageUrl: 'images/feature-2.png',792 itemId: mongoose.Types.ObjectId('5e96cbe292b97300fc902222'),793 },794 {795 // done796 _id: mongoose.Types.ObjectId('5e96cbe292b97300fc90aa03'),797 name: 'televison',798 qty: 12,799 imageUrl: 'images/feature-3.png',800 itemId: mongoose.Types.ObjectId('5e96cbe292b97300fc902222'),801 },802 {803 // done804 _id: mongoose.Types.ObjectId('5e96cbe292b97300fc90aa04'),805 name: 'televison',806 qty: 5,807 imageUrl: 'images/feature-4.png',808 itemId: mongoose.Types.ObjectId('5e96cbe292b97300fc902222'),809 },810 {811 // done812 _id: mongoose.Types.ObjectId('5e96cbe292b97300fc90aa05'),813 name: 'mbp/s',814 qty: 5,815 imageUrl: 'images/feature-5.png',816 itemId: mongoose.Types.ObjectId('5e96cbe292b97300fc902222'),817 },818 {819 // done820 _id: mongoose.Types.ObjectId('5e96cbe292b97300fc90aa06'),821 name: 'unit ready',822 qty: 5,823 imageUrl: 'images/feature-6.png',824 itemId: mongoose.Types.ObjectId('5e96cbe292b97300fc902222'),825 },826 {827 // done828 _id: mongoose.Types.ObjectId('5e96cbe292b97300fc90aa07'),829 name: 'refigrator',830 qty: 5,831 imageUrl: 'images/feature-7.png',832 itemId: mongoose.Types.ObjectId('5e96cbe292b97300fc902222'),833 },834 {835 // done836 _id: mongoose.Types.ObjectId('5e96cbe292b97300fc90aa08'),837 name: 'televion',838 qty: 5,839 imageUrl: 'images/feature-8.png',840 itemId: mongoose.Types.ObjectId('5e96cbe292b97300fc902222'),841 },842 // item 2843 {844 // done845 _id: mongoose.Types.ObjectId('5e96cbe292b97300fc90aa09'),846 name: 'bedroom',847 qty: 2,848 imageUrl: 'images/feature-1.png',849 itemId: mongoose.Types.ObjectId('5e96cbe292b97300fc902223'),850 },851 {852 // done853 _id: mongoose.Types.ObjectId('5e96cbe292b97300fc90aa10'),854 name: 'living room',855 qty: 23,856 imageUrl: 'images/feature-2.png',857 itemId: mongoose.Types.ObjectId('5e96cbe292b97300fc902223'),858 },859 {860 // done861 _id: mongoose.Types.ObjectId('5e96cbe292b97300fc90aa11'),862 name: 'televison',863 qty: 12,864 imageUrl: 'images/feature-3.png',865 itemId: mongoose.Types.ObjectId('5e96cbe292b97300fc902223'),866 },867 {868 // done869 _id: mongoose.Types.ObjectId('5e96cbe292b97300fc90aa12'),870 name: 'televison',871 qty: 5,872 imageUrl: 'images/feature-4.png',873 itemId: mongoose.Types.ObjectId('5e96cbe292b97300fc902223'),874 },875 {876 // done877 _id: mongoose.Types.ObjectId('5e96cbe292b97300fc90aa13'),878 name: 'mbp/s',879 qty: 5,880 imageUrl: 'images/feature-5.png',881 itemId: mongoose.Types.ObjectId('5e96cbe292b97300fc902223'),882 },883 {884 // done885 _id: mongoose.Types.ObjectId('5e96cbe292b97300fc90aa14'),886 name: 'unit ready',887 qty: 5,888 imageUrl: 'images/feature-6.png',889 itemId: mongoose.Types.ObjectId('5e96cbe292b97300fc902223'),890 },891 {892 // done893 _id: mongoose.Types.ObjectId('5e96cbe292b97300fc90aa15'),894 name: 'refigrator',895 qty: 5,896 imageUrl: 'images/feature-7.png',897 itemId: mongoose.Types.ObjectId('5e96cbe292b97300fc902223'),898 },899 {900 // done901 _id: mongoose.Types.ObjectId('5e96cbe292b97300fc90aa16'),902 name: 'televion',903 qty: 5,904 imageUrl: 'images/feature-8.png',905 itemId: mongoose.Types.ObjectId('5e96cbe292b97300fc902223'),906 }907 ]908 },909 // end feature910 // start activity911 {912 'model': 'Activity',913 'documents': [914 // done915 {916 _id: mongoose.Types.ObjectId('5e96cbe292b97300fc90bb01'),917 name: 'Green Lake',918 type: 'Nature',919 imageUrl: 'images/activity-1.png',920 itemId: mongoose.Types.ObjectId('5e96cbe292b97300fc902222'),921 },922 {923 _id: mongoose.Types.ObjectId('5e96cbe292b97300fc90bb02'),924 name: 'Dog Clubs',925 type: 'Pool',926 imageUrl: 'images/activity-2.png',927 itemId: mongoose.Types.ObjectId('5e96cbe292b97300fc902222'),928 },929 {930 _id: mongoose.Types.ObjectId('5e96cbe292b97300fc90bb03'),931 name: 'Labour and Wait',932 type: 'Shopping',933 imageUrl: 'images/activity-3.png',934 itemId: mongoose.Types.ObjectId('5e96cbe292b97300fc902222'),935 },936 {937 _id: mongoose.Types.ObjectId('5e96cbe292b97300fc90bb04'),938 name: 'Labour and Wait',939 type: 'Shopping',940 imageUrl: 'images/activity-4.png',941 itemId: mongoose.Types.ObjectId('5e96cbe292b97300fc902222'),942 },943 // done 2944 {945 _id: mongoose.Types.ObjectId('5e96cbe292b97300fc90bb05'),946 name: 'Green Lake',947 type: 'Nature',948 imageUrl: 'images/activity-3.png',949 itemId: mongoose.Types.ObjectId('5e96cbe292b97300fc902223'),950 },951 {952 _id: mongoose.Types.ObjectId('5e96cbe292b97300fc90bb06'),953 name: 'Dog Clubs',954 type: 'Pool',955 imageUrl: 'images/activity-2.png',956 itemId: mongoose.Types.ObjectId('5e96cbe292b97300fc902223'),957 },958 {959 _id: mongoose.Types.ObjectId('5e96cbe292b97300fc90bb07'),960 name: 'Labour and Wait',961 type: 'Shopping',962 imageUrl: 'images/activity-1.png',963 itemId: mongoose.Types.ObjectId('5e96cbe292b97300fc902223'),964 },965 {966 _id: mongoose.Types.ObjectId('5e96cbe292b97300fc90bb08'),967 name: 'Labour and Wait',968 type: 'Shopping',969 imageUrl: 'images/activity-4.png',970 itemId: mongoose.Types.ObjectId('5e96cbe292b97300fc902223'),971 }972 ]973 },974 // end activity975 // start booking976 {977 'model': 'Booking',978 'documents': [979 {980 _id: mongoose.Types.ObjectId('5e96cbe292b97300fc90cee1'),981 bookingStartDate: '12-12-2020',982 bookingEndDate: '12-12-2020',983 invoice: 1231231,984 itemId: {985 _id: mongoose.Types.ObjectId('5e96cbe292b97300fc902222'),986 title: 'Village Angga',987 price: 6,988 duration: 2,989 },990 total: 12,991 memberId: mongoose.Types.ObjectId('5e96cbe292b97300fc903333'),992 bankId: mongoose.Types.ObjectId('5e96cbe292b97300fc903323'),993 payments: {994 proofPayment: 'images/bukti.jpeg',995 bankFrom: 'BCA',996 status: 'Proses',997 accountHolder: 'ang'998 }999 }1000 ]1001 },1002 // end booking1003 // member1004 {1005 'model': 'Member',1006 'documents': [1007 {1008 _id: mongoose.Types.ObjectId('5e96cbe292b97300fc903333'),1009 firstName: 'Rizal',1010 lastName: 'Khisyam',1011 email: 'rkhisyam54@gmail.com',1012 phoneNumber: '082377954008'1013 },1014 {1015 _id: mongoose.Types.ObjectId('5e96cbe292b97300fc903334'),1016 firstName: 'Muhammad',1017 lastName: 'Rizal',1018 email: 'khisyamr54@gmail.com',1019 phoneNumber: '082377954008'1020 }1021 ]1022 },1023 {1024 'model': 'Bank',1025 'documents': [1026 {1027 _id: mongoose.Types.ObjectId('5e96cbe292b97300fc903322'),1028 nameBank: 'Mandiri',1029 accountNumber: '089898',1030 name: 'elfin',1031 imageUrl: 'images/logo bca.png'1032 },1033 {1034 _id: mongoose.Types.ObjectId('5e96cbe292b97300fc903323'),1035 nameBank: 'BCA',1036 accountNumber: '878678',1037 name: 'elfin',1038 imageUrl: 'images/logo mandiri.png'1039 }1040 ]1041 },1042 {1043 'model': 'User',1044 'documents': [1045 {1046 _id: mongoose.Types.ObjectId('5e96cbe292b97300fc903345'),1047 username: 'admin',1048 password: 'rahasia',1049 },1050 {1051 _id: mongoose.Types.ObjectId('5e96cbe292b97300fc903346'),1052 username: 'superadmin',1053 password: 'rahasia',1054 },1055 ]1056 }...

Full Screen

Full Screen

index.js

Source:index.js Github

copy

Full Screen

1"use strict";2Object.defineProperty(exports, "__esModule", {3 value: true4});5exports.TSBASETYPE_TYPES = exports.TSTYPE_TYPES = exports.TSTYPEELEMENT_TYPES = exports.JSX_TYPES = exports.ENUMMEMBER_TYPES = exports.ENUMBODY_TYPES = exports.FLOWPREDICATE_TYPES = exports.FLOWDECLARATION_TYPES = exports.FLOWBASEANNOTATION_TYPES = exports.FLOWTYPE_TYPES = exports.FLOW_TYPES = exports.PRIVATE_TYPES = exports.MODULESPECIFIER_TYPES = exports.EXPORTDECLARATION_TYPES = exports.MODULEDECLARATION_TYPES = exports.CLASS_TYPES = exports.PATTERN_TYPES = exports.UNARYLIKE_TYPES = exports.PROPERTY_TYPES = exports.OBJECTMEMBER_TYPES = exports.METHOD_TYPES = exports.USERWHITESPACABLE_TYPES = exports.IMMUTABLE_TYPES = exports.LITERAL_TYPES = exports.TSENTITYNAME_TYPES = exports.LVAL_TYPES = exports.PATTERNLIKE_TYPES = exports.DECLARATION_TYPES = exports.PUREISH_TYPES = exports.FUNCTIONPARENT_TYPES = exports.FUNCTION_TYPES = exports.FORXSTATEMENT_TYPES = exports.FOR_TYPES = exports.EXPRESSIONWRAPPER_TYPES = exports.WHILE_TYPES = exports.LOOP_TYPES = exports.CONDITIONAL_TYPES = exports.COMPLETIONSTATEMENT_TYPES = exports.TERMINATORLESS_TYPES = exports.STATEMENT_TYPES = exports.BLOCK_TYPES = exports.BLOCKPARENT_TYPES = exports.SCOPABLE_TYPES = exports.BINARY_TYPES = exports.EXPRESSION_TYPES = void 0;6var _definitions = require("../../definitions");7const EXPRESSION_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Expression"];8exports.EXPRESSION_TYPES = EXPRESSION_TYPES;9const BINARY_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Binary"];10exports.BINARY_TYPES = BINARY_TYPES;11const SCOPABLE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Scopable"];12exports.SCOPABLE_TYPES = SCOPABLE_TYPES;13const BLOCKPARENT_TYPES = _definitions.FLIPPED_ALIAS_KEYS["BlockParent"];14exports.BLOCKPARENT_TYPES = BLOCKPARENT_TYPES;15const BLOCK_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Block"];16exports.BLOCK_TYPES = BLOCK_TYPES;17const STATEMENT_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Statement"];18exports.STATEMENT_TYPES = STATEMENT_TYPES;19const TERMINATORLESS_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Terminatorless"];20exports.TERMINATORLESS_TYPES = TERMINATORLESS_TYPES;21const COMPLETIONSTATEMENT_TYPES = _definitions.FLIPPED_ALIAS_KEYS["CompletionStatement"];22exports.COMPLETIONSTATEMENT_TYPES = COMPLETIONSTATEMENT_TYPES;23const CONDITIONAL_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Conditional"];24exports.CONDITIONAL_TYPES = CONDITIONAL_TYPES;25const LOOP_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Loop"];26exports.LOOP_TYPES = LOOP_TYPES;27const WHILE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["While"];28exports.WHILE_TYPES = WHILE_TYPES;29const EXPRESSIONWRAPPER_TYPES = _definitions.FLIPPED_ALIAS_KEYS["ExpressionWrapper"];30exports.EXPRESSIONWRAPPER_TYPES = EXPRESSIONWRAPPER_TYPES;31const FOR_TYPES = _definitions.FLIPPED_ALIAS_KEYS["For"];32exports.FOR_TYPES = FOR_TYPES;33const FORXSTATEMENT_TYPES = _definitions.FLIPPED_ALIAS_KEYS["ForXStatement"];34exports.FORXSTATEMENT_TYPES = FORXSTATEMENT_TYPES;35const FUNCTION_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Function"];36exports.FUNCTION_TYPES = FUNCTION_TYPES;37const FUNCTIONPARENT_TYPES = _definitions.FLIPPED_ALIAS_KEYS["FunctionParent"];38exports.FUNCTIONPARENT_TYPES = FUNCTIONPARENT_TYPES;39const PUREISH_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Pureish"];40exports.PUREISH_TYPES = PUREISH_TYPES;41const DECLARATION_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Declaration"];42exports.DECLARATION_TYPES = DECLARATION_TYPES;43const PATTERNLIKE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["PatternLike"];44exports.PATTERNLIKE_TYPES = PATTERNLIKE_TYPES;45const LVAL_TYPES = _definitions.FLIPPED_ALIAS_KEYS["LVal"];46exports.LVAL_TYPES = LVAL_TYPES;47const TSENTITYNAME_TYPES = _definitions.FLIPPED_ALIAS_KEYS["TSEntityName"];48exports.TSENTITYNAME_TYPES = TSENTITYNAME_TYPES;49const LITERAL_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Literal"];50exports.LITERAL_TYPES = LITERAL_TYPES;51const IMMUTABLE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Immutable"];52exports.IMMUTABLE_TYPES = IMMUTABLE_TYPES;53const USERWHITESPACABLE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["UserWhitespacable"];54exports.USERWHITESPACABLE_TYPES = USERWHITESPACABLE_TYPES;55const METHOD_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Method"];56exports.METHOD_TYPES = METHOD_TYPES;57const OBJECTMEMBER_TYPES = _definitions.FLIPPED_ALIAS_KEYS["ObjectMember"];58exports.OBJECTMEMBER_TYPES = OBJECTMEMBER_TYPES;59const PROPERTY_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Property"];60exports.PROPERTY_TYPES = PROPERTY_TYPES;61const UNARYLIKE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["UnaryLike"];62exports.UNARYLIKE_TYPES = UNARYLIKE_TYPES;63const PATTERN_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Pattern"];64exports.PATTERN_TYPES = PATTERN_TYPES;65const CLASS_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Class"];66exports.CLASS_TYPES = CLASS_TYPES;67const MODULEDECLARATION_TYPES = _definitions.FLIPPED_ALIAS_KEYS["ModuleDeclaration"];68exports.MODULEDECLARATION_TYPES = MODULEDECLARATION_TYPES;69const EXPORTDECLARATION_TYPES = _definitions.FLIPPED_ALIAS_KEYS["ExportDeclaration"];70exports.EXPORTDECLARATION_TYPES = EXPORTDECLARATION_TYPES;71const MODULESPECIFIER_TYPES = _definitions.FLIPPED_ALIAS_KEYS["ModuleSpecifier"];72exports.MODULESPECIFIER_TYPES = MODULESPECIFIER_TYPES;73const PRIVATE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Private"];74exports.PRIVATE_TYPES = PRIVATE_TYPES;75const FLOW_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Flow"];76exports.FLOW_TYPES = FLOW_TYPES;77const FLOWTYPE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["FlowType"];78exports.FLOWTYPE_TYPES = FLOWTYPE_TYPES;79const FLOWBASEANNOTATION_TYPES = _definitions.FLIPPED_ALIAS_KEYS["FlowBaseAnnotation"];80exports.FLOWBASEANNOTATION_TYPES = FLOWBASEANNOTATION_TYPES;81const FLOWDECLARATION_TYPES = _definitions.FLIPPED_ALIAS_KEYS["FlowDeclaration"];82exports.FLOWDECLARATION_TYPES = FLOWDECLARATION_TYPES;83const FLOWPREDICATE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["FlowPredicate"];84exports.FLOWPREDICATE_TYPES = FLOWPREDICATE_TYPES;85const ENUMBODY_TYPES = _definitions.FLIPPED_ALIAS_KEYS["EnumBody"];86exports.ENUMBODY_TYPES = ENUMBODY_TYPES;87const ENUMMEMBER_TYPES = _definitions.FLIPPED_ALIAS_KEYS["EnumMember"];88exports.ENUMMEMBER_TYPES = ENUMMEMBER_TYPES;89const JSX_TYPES = _definitions.FLIPPED_ALIAS_KEYS["JSX"];90exports.JSX_TYPES = JSX_TYPES;91const TSTYPEELEMENT_TYPES = _definitions.FLIPPED_ALIAS_KEYS["TSTypeElement"];92exports.TSTYPEELEMENT_TYPES = TSTYPEELEMENT_TYPES;93const TSTYPE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["TSType"];94exports.TSTYPE_TYPES = TSTYPE_TYPES;95const TSBASETYPE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["TSBaseType"];...

Full Screen

Full Screen

propTypes.ts

Source:propTypes.ts Github

copy

Full Screen

1import PropTypes from 'prop-types';23const self = PropTypes.shape({4 href: PropTypes.string.isRequired,5 title: PropTypes.string.isRequired,6}).isRequired;78const Links2 = PropTypes.shape({9 self,10}).isRequired;1112const Small = PropTypes.shape({13 url: PropTypes.string.isRequired,14 width: PropTypes.number.isRequired,15 height: PropTypes.number.isRequired,16}).isRequired;1718const Regular = PropTypes.shape({19 url: PropTypes.string.isRequired,20 width: PropTypes.number.isRequired,21 height: PropTypes.number.isRequired,22}).isRequired;2324const Large = PropTypes.shape({25 url: PropTypes.string.isRequired,26 width: PropTypes.number.isRequired,27 height: PropTypes.number.isRequired,28}).isRequired;2930const Thumbnail = PropTypes.shape({31 url: PropTypes.string.isRequired,32 width: PropTypes.number.isRequired,33 height: PropTypes.number.isRequired,34}).isRequired;3536const Images = PropTypes.shape({37 THUMBNAIL: Thumbnail,38 SMALL: Small,39 REGULAR: Regular,40 LARGE: Large,41}).isRequired;4243const Ingredient = PropTypes.shape({44 text: PropTypes.string.isRequired,45 quantity: PropTypes.number.isRequired,46 measure: PropTypes.string,47 food: PropTypes.string.isRequired,48 weight: PropTypes.number.isRequired,49 foodCategory: PropTypes.string,50 foodId: PropTypes.string.isRequired,51 image: PropTypes.string,52}).isRequired;5354const elemData = PropTypes.shape({55 label: PropTypes.string.isRequired,56 quantity: PropTypes.number.isRequired,57 unit: PropTypes.string.isRequired,58}).isRequired;5960const TotalNutrients = PropTypes.shape({61 ENERC_KCAL: elemData,62 FAT: elemData,63 FASAT: elemData,64 FATRN: elemData,65 FAMS: elemData,66 FAPU: elemData,67 CHOCDF: elemData,68 FIBTG: elemData,69 SUGAR: elemData,70 PROCNT: elemData,71 CHOLE: elemData,72 NA: elemData,73 CA: elemData,74 MG: elemData,75 K: elemData,76 FE: elemData,77 ZN: elemData,78 P: elemData,79 VITA_RAE: elemData,80 VITC: elemData,81 THIA: elemData,82 RIBF: elemData,83 NIA: elemData,84 VITB6A: elemData,85 FOLDFE: elemData,86 FOLFD: elemData,87 FOLAC: elemData,88 VITB12: elemData,89 VITD: elemData,90 TOCPHA: elemData,91 VITK1: elemData,92 WATER: elemData,93}).isRequired;9495const Sub = PropTypes.shape({96 label: PropTypes.string,97 tag: PropTypes.string,98 schemaOrgTag: PropTypes.string,99 total: PropTypes.number,100 hasRDI: PropTypes.bool,101 daily: PropTypes.number,102 unit: PropTypes.string,103}).isRequired;104105const Digest = PropTypes.shape({106 label: PropTypes.string,107 tag: PropTypes.string,108 schemaOrgTag: PropTypes.string,109 total: PropTypes.number,110 hasRDI: PropTypes.bool,111 daily: PropTypes.number,112 unit: PropTypes.string,113 sub: PropTypes.arrayOf(Sub),114}).isRequired;115116const Recipe = PropTypes.shape({117 uri: PropTypes.string,118 label: PropTypes.string,119 image: PropTypes.string,120 images: Images,121 source: PropTypes.string,122 url: PropTypes.string,123 shareAs: PropTypes.string,124 yield: PropTypes.number,125 dietLabels: PropTypes.arrayOf(PropTypes.string),126 healthLabels: PropTypes.arrayOf(PropTypes.string),127 cautions: PropTypes.arrayOf(PropTypes.string),128 ingredientLines: PropTypes.arrayOf(PropTypes.string),129 ingredients: PropTypes.arrayOf(Ingredient),130 calories: PropTypes.number,131 totalWeight: PropTypes.number,132 totalTime: PropTypes.number,133 cuisineType: PropTypes.arrayOf(PropTypes.string),134 mealType: PropTypes.arrayOf(PropTypes.string),135 dishType: PropTypes.arrayOf(PropTypes.string),136 totalNutrients: TotalNutrients,137 totalDaily: TotalNutrients,138 digest: PropTypes.arrayOf(Digest),139}).isRequired;140141export const HitPropType = PropTypes.shape({142 recipe: Recipe,143 _links: Links2,144}).isRequired;145146export const Next = PropTypes.shape({147 href: PropTypes.string,148 title: PropTypes.string,149});150151export const Links = PropTypes.shape({152 next: Next,153});154155export const SearchResultProps = PropTypes.shape({156 from: PropTypes.number,157 to: PropTypes.number,158 count: PropTypes.number,159 _links: Links,160 hits: PropTypes.arrayOf(HitPropType), ...

Full Screen

Full Screen

types.js

Source:types.js Github

copy

Full Screen

1import PropTypes from 'prop-types';2export const moviesTypes = PropTypes.shape({3 adult: PropTypes.bool,4 backdrop_path: PropTypes.string,5 genre_ids: PropTypes.array,6 id: PropTypes.number,7 original_language: PropTypes.string,8 original_title: PropTypes.string,9 overview: PropTypes.string,10 popularity: PropTypes.number,11 poster_path: PropTypes.string,12 release_date: PropTypes.string,13 title: PropTypes.string,14 video: PropTypes.bool,15 vote_average: PropTypes.number,16 vote_count: PropTypes.number,17 });18 export const movieInfo = PropTypes.shape({19 adult: PropTypes.bool,20 backdrop_path: PropTypes.string,21 belongs_to_collection: PropTypes.object,22 budget: PropTypes.number,23 genres: PropTypes.array,24 homepage: PropTypes.string,25 id: PropTypes.number,26 imdb_id: PropTypes.string,27 original_language: PropTypes.string,28 original_title: PropTypes.string,29 overview: PropTypes.string,30 popularity: PropTypes.number,31 poster_path: PropTypes.string,32 production_companies: PropTypes.array,33 production_countries: PropTypes.array,34 release_date: PropTypes.string,35 revenue: PropTypes.number,36 runtime: PropTypes.number,37 spoken_languages: PropTypes.array,38 status: PropTypes.string,39 tagline: PropTypes.string,40 title: PropTypes.string,41 video: PropTypes.bool,42 vote_average: PropTypes.number,43 vote_count: PropTypes.number,...

Full Screen

Full Screen

Using AI Code Generation

copy

Full Screen

1module.exports = function (context, req) {2 context.log('JavaScript HTTP trigger function processed a request.');3 if (req.query.name || (req.body && req.body.name)) {4 context.res = {5 body: "Hello " + (req.query.name || req.body.name)6 };7 }8 else {9 context.res = {10 };11 }12 context.done();13};14module.exports = function (context, req) {15 context.log('JavaScript HTTP trigger function processed a request.');16 if (req.query.name || (req.body && req.body.name)) {17 context.res = {18 body: "Hello " + (req.query.name || req.body.name)19 };20 }21 else {22 context.res = {23 };24 }25 context.done();26};27module.exports = function (context, req) {28 context.log('JavaScript HTTP trigger function processed a request.');29 if (req.query.name || (req.body && req.body.name)) {30 context.res = {31 body: "Hello " + (req.query.name || req.body.name)32 };33 }34 else {35 context.res = {36 };37 }38 context.done();39};40module.exports = function (context, req) {41 context.log('JavaScript HTTP trigger function processed a request.');42 if (req.query.name || (req.body && req.body.name)) {43 context.res = {44 body: "Hello " + (req.query.name || req.body.name)45 };46 }47 else {48 context.res = {

Full Screen

Using AI Code Generation

copy

Full Screen

1var wpt = require('webpagetest');2var test = wpt('www.webpagetest.org');3 if (err) return console.error(err);4 console.log(data);5 test.getTestResults(data.data.testId, function(err, data) {6 if (err) return console.error(err);7 console.log(data);8 });9});

Full Screen

Using AI Code Generation

copy

Full Screen

1var wpt = require('webpagetest');2var fs = require('fs');3var wpt = new WebPageTest('www.webpagetest.org', 'A.6b7f0e8d8e2c1d6b2c7b0f8b1c7d9d06');4wpt.getTesters(function(err, data) {5 console.log(data);6});

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 wpt 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