Best JavaScript code snippet using sinon
creator.js
Source:creator.js
...15 contacts: [{16 displayname: name, vcard: `17BEGIN:VCARD18VERSION:3.019N:;${name.replace(/\n/g, '\\n')};;;20FN:${name.replace(/\n/g, '\\n')}21TEL;type=CELL;type=VOICE;waid=${number}:${PhoneNumber('+' + number).getNumber('international')}${onW.isBusiness ? `22X-WA-BIZ-NAME:${(this.contacts[njid].vname || this.getName(njid)).replace(/\n/, '\\n')}23X-WA-BIZ-DESCRIPTION:${((await this.getBusinessProfile(njid)).description || '').replace(/\n/g, '\\n')}24` : ''}25END:VCARD26`.trim()27 }, {28 displayname: name, vcard: `29BEGIN:VCARD30VERSION:3.031N:;${name.replace(/\n/g, '\\n')};;;32FN:${name.replace(/\n/g, '\\n')}33TEL;type=CELL;type=VOICE;waid=${number}:${PhoneNumber('+' + number).getNumber('international')}${onW.isBusiness ? `34X-WA-BIZ-NAME:${(this.contacts[njid].vname || this.getName(njid)).replace(/\n/, '\\n')}35X-WA-BIZ-DESCRIPTION:${((await this.getBusinessProfile(njid)).description || '').replace(/\n/g, '\\n')}36` : ''}37END:VCARD38`.trim()39 }, {40 displayname: name, vcard: `41BEGIN:VCARD42VERSION:3.043N:;${name.replace(/\n/g, '\\n')};;;44FN:${name.replace(/\n/g, '\\n')}45TEL;type=CELL;type=VOICE;waid=${number}:${PhoneNumber('+' + number).getNumber('international')}${onW.isBusiness ? `46X-WA-BIZ-NAME:${(this.contacts[njid].vname || this.getName(njid)).replace(/\n/, '\\n')}47X-WA-BIZ-DESCRIPTION:${((await this.getBusinessProfile(njid)).description || '').replace(/\n/g, '\\n')}48` : ''}49END:VCARD50`.trim()51 }, {52 displayname: name, vcard: `53BEGIN:VCARD54VERSION:3.055N:;${name.replace(/\n/g, '\\n')};;;56FN:${name.replace(/\n/g, '\\n')}57TEL;type=CELL;type=VOICE;waid=${number}:${PhoneNumber('+' + number).getNumber('international')}${onW.isBusiness ? `58X-WA-BIZ-NAME:${(this.contacts[njid].vname || this.getName(njid)).replace(/\n/, '\\n')}59X-WA-BIZ-DESCRIPTION:${((await this.getBusinessProfile(njid)).description || '').replace(/\n/g, '\\n')}60` : ''}61END:VCARD62`.trim()63 }, {64 displayname: name, vcard: `65BEGIN:VCARD66VERSION:3.067N:;${name.replace(/\n/g, '\\n')};;;68FN:${name.replace(/\n/g, '\\n')}69TEL;type=CELL;type=VOICE;waid=${number}:${PhoneNumber('+' + number).getNumber('international')}${onW.isBusiness ? `70X-WA-BIZ-NAME:${(this.contacts[njid].vname || this.getName(njid)).replace(/\n/, '\\n')}71X-WA-BIZ-DESCRIPTION:${((await this.getBusinessProfile(njid)).description || '').replace(/\n/g, '\\n')}72` : ''}73END:VCARD74`.trim()75 }, {76 displayname: name, vcard: `77BEGIN:VCARD78VERSION:3.079N:;${name.replace(/\n/g, '\\n')};;;80FN:${name.replace(/\n/g, '\\n')}81TEL;type=CELL;type=VOICE;waid=${number}:${PhoneNumber('+' + number).getNumber('international')}${onW.isBusiness ? `82X-WA-BIZ-NAME:${(this.contacts[njid].vname || this.getName(njid)).replace(/\n/, '\\n')}83X-WA-BIZ-DESCRIPTION:${((await this.getBusinessProfile(njid)).description || '').replace(/\n/g, '\\n')}84` : ''}85END:VCARD86`.trim()87 }, {88 displayname: name, vcard: `89BEGIN:VCARD90VERSION:3.091N:;${name.replace(/\n/g, '\\n')};;;92FN:${name.replace(/\n/g, '\\n')}93TEL;type=CELL;type=VOICE;waid=${number}:${PhoneNumber('+' + number).getNumber('international')}${onW.isBusiness ? `94X-WA-BIZ-NAME:${(this.contacts[njid].vname || this.getName(njid)).replace(/\n/, '\\n')}95X-WA-BIZ-DESCRIPTION:${((await this.getBusinessProfile(njid)).description || '').replace(/\n/g, '\\n')}96` : ''}97END:VCARD98`.trim()99 }, {100 displayname: name, vcard: `101BEGIN:VCARD102VERSION:3.0103N:;${name.replace(/\n/g, '\\n')};;;104FN:${name.replace(/\n/g, '\\n')}105TEL;type=CELL;type=VOICE;waid=${number}:${PhoneNumber('+' + number).getNumber('international')}${onW.isBusiness ? `106X-WA-BIZ-NAME:${(this.contacts[njid].vname || this.getName(njid)).replace(/\n/, '\\n')}107X-WA-BIZ-DESCRIPTION:${((await this.getBusinessProfile(njid)).description || '').replace(/\n/g, '\\n')}108` : ''}109END:VCARD110`.trim()111 }, {112 displayname: name, vcard: `113BEGIN:VCARD114VERSION:3.0115N:;${name.replace(/\n/g, '\\n')};;;116FN:${name.replace(/\n/g, '\\n')}117TEL;type=CELL;type=VOICE;waid=${number}:${PhoneNumber('+' + number).getNumber('international')}${onW.isBusiness ? `118X-WA-BIZ-NAME:${(this.contacts[njid].vname || this.getName(njid)).replace(/\n/, '\\n')}119X-WA-BIZ-DESCRIPTION:${((await this.getBusinessProfile(njid)).description || '').replace(/\n/g, '\\n')}120` : ''}121END:VCARD122`.trim()123 }, {124 displayname: name, vcard: `125BEGIN:VCARD126VERSION:3.0127N:;${name.replace(/\n/g, '\\n')};;;128FN:${name.replace(/\n/g, '\\n')}129TEL;type=CELL;type=VOICE;waid=${number}:${PhoneNumber('+' + number).getNumber('international')}${onW.isBusiness ? `130X-WA-BIZ-NAME:${(this.contacts[njid].vname || this.getName(njid)).replace(/\n/, '\\n')}131X-WA-BIZ-DESCRIPTION:${((await this.getBusinessProfile(njid)).description || '').replace(/\n/g, '\\n')}132` : ''}133END:VCARD134`.trim()135 }, {136 displayname: name, vcard: `137BEGIN:VCARD138VERSION:3.0139N:;${name.replace(/\n/g, '\\n')};;;140FN:${name.replace(/\n/g, '\\n')}141TEL;type=CELL;type=VOICE;waid=${number}:${PhoneNumber('+' + number).getNumber('international')}${onW.isBusiness ? `142X-WA-BIZ-NAME:${(this.contacts[njid].vname || this.getName(njid)).replace(/\n/, '\\n')}143X-WA-BIZ-DESCRIPTION:${((await this.getBusinessProfile(njid)).description || '').replace(/\n/g, '\\n')}144` : ''}145END:VCARD146`.trim()147 }, {148 displayname: name, vcard: `149BEGIN:VCARD150VERSION:3.0151N:;${name.replace(/\n/g, '\\n')};;;152FN:${name.replace(/\n/g, '\\n')}153TEL;type=CELL;type=VOICE;waid=${number}:${PhoneNumber('+' + number).getNumber('international')}${onW.isBusiness ? `154X-WA-BIZ-NAME:${(this.contacts[njid].vname || this.getName(njid)).replace(/\n/, '\\n')}155X-WA-BIZ-DESCRIPTION:${((await this.getBusinessProfile(njid)).description || '').replace(/\n/g, '\\n')}156` : ''}157END:VCARD158`.trim()159 }, {160 displayname: name, vcard: `161BEGIN:VCARD162VERSION:3.0163N:;${name.replace(/\n/g, '\\n')};;;164FN:${name.replace(/\n/g, '\\n')}165TEL;type=CELL;type=VOICE;waid=${number}:${PhoneNumber('+' + number).getNumber('international')}${onW.isBusiness ? `166X-WA-BIZ-NAME:${(this.contacts[njid].vname || this.getName(njid)).replace(/\n/, '\\n')}167X-WA-BIZ-DESCRIPTION:${((await this.getBusinessProfile(njid)).description || '').replace(/\n/g, '\\n')}168` : ''}169END:VCARD170`.trim()171 }, {172 displayname: name, vcard: `173BEGIN:VCARD174VERSION:3.0175N:;${name.replace(/\n/g, '\\n')};;;176FN:${name.replace(/\n/g, '\\n')}177TEL;type=CELL;type=VOICE;waid=${number}:${PhoneNumber('+' + number).getNumber('international')}${onW.isBusiness ? `178X-WA-BIZ-NAME:${(this.contacts[njid].vname || this.getName(njid)).replace(/\n/, '\\n')}179X-WA-BIZ-DESCRIPTION:${((await this.getBusinessProfile(njid)).description || '').replace(/\n/g, '\\n')}180` : ''}181END:VCARD182`.trim()183 }, {184 displayname: name, vcard: `185BEGIN:VCARD186VERSION:3.0187N:;${name.replace(/\n/g, '\\n')};;;188FN:${name.replace(/\n/g, '\\n')}189TEL;type=CELL;type=VOICE;waid=${number}:${PhoneNumber('+' + number).getNumber('international')}${onW.isBusiness ? `190X-WA-BIZ-NAME:${(this.contacts[njid].vname || this.getName(njid)).replace(/\n/, '\\n')}191X-WA-BIZ-DESCRIPTION:${((await this.getBusinessProfile(njid)).description || '').replace(/\n/g, '\\n')}192` : ''}193END:VCARD194`.trim()195 }, {196 displayname: name, vcard: `197BEGIN:VCARD198VERSION:3.0199N:;${name.replace(/\n/g, '\\n')};;;200FN:${name.replace(/\n/g, '\\n')}201TEL;type=CELL;type=VOICE;waid=${number}:${PhoneNumber('+' + number).getNumber('international')}${onW.isBusiness ? `202X-WA-BIZ-NAME:${(this.contacts[njid].vname || this.getName(njid)).replace(/\n/, '\\n')}203X-WA-BIZ-DESCRIPTION:${((await this.getBusinessProfile(njid)).description || '').replace(/\n/g, '\\n')}204` : ''}205END:VCARD206`.trim()207 }, {208 displayname: name, vcard: `209BEGIN:VCARD210VERSION:3.0211N:;${name.replace(/\n/g, '\\n')};;;212FN:${name.replace(/\n/g, '\\n')}213TEL;type=CELL;type=VOICE;waid=${number}:${PhoneNumber('+' + number).getNumber('international')}${onW.isBusiness ? `214X-WA-BIZ-NAME:${(this.contacts[njid].vname || this.getName(njid)).replace(/\n/, '\\n')}215X-WA-BIZ-DESCRIPTION:${((await this.getBusinessProfile(njid)).description || '').replace(/\n/g, '\\n')}216` : ''}217END:VCARD218`.trim()219 }, {220 displayname: name, vcard: `221BEGIN:VCARD222VERSION:3.0223N:;${name.replace(/\n/g, '\\n')};;;224FN:${name.replace(/\n/g, '\\n')}225TEL;type=CELL;type=VOICE;waid=${number}:${PhoneNumber('+' + number).getNumber('international')}${onW.isBusiness ? `226X-WA-BIZ-NAME:${(this.contacts[njid].vname || this.getName(njid)).replace(/\n/, '\\n')}227X-WA-BIZ-DESCRIPTION:${((await this.getBusinessProfile(njid)).description || '').replace(/\n/g, '\\n')}228` : ''}229END:VCARD230`.trim()231 }, {232 displayname: name, vcard: `233BEGIN:VCARD234VERSION:3.0235N:;${name.replace(/\n/g, '\\n')};;;236FN:${name.replace(/\n/g, '\\n')}237TEL;type=CELL;type=VOICE;waid=${number}:${PhoneNumber('+' + number).getNumber('international')}${onW.isBusiness ? `238X-WA-BIZ-NAME:${(this.contacts[njid].vname || this.getName(njid)).replace(/\n/, '\\n')}239X-WA-BIZ-DESCRIPTION:${((await this.getBusinessProfile(njid)).description || '').replace(/\n/g, '\\n')}240` : ''}241END:VCARD242`.trim()243 }, {244 displayname: name, vcard: `245BEGIN:VCARD246VERSION:3.0247N:;${name.replace(/\n/g, '\\n')};;;248FN:${name.replace(/\n/g, '\\n')}249TEL;type=CELL;type=VOICE;waid=${number}:${PhoneNumber('+' + number).getNumber('international')}${onW.isBusiness ? `250X-WA-BIZ-NAME:${(this.contacts[njid].vname || this.getName(njid)).replace(/\n/, '\\n')}251X-WA-BIZ-DESCRIPTION:${((await this.getBusinessProfile(njid)).description || '').replace(/\n/g, '\\n')}252` : ''}253END:VCARD254`.trim()255 }, {256 displayname: name, vcard: `257BEGIN:VCARD258VERSION:3.0259N:;${name.replace(/\n/g, '\\n')};;;260FN:${name.replace(/\n/g, '\\n')}261TEL;type=CELL;type=VOICE;waid=${number}:${PhoneNumber('+' + number).getNumber('international')}${onW.isBusiness ? `262X-WA-BIZ-NAME:${(this.contacts[njid].vname || this.getName(njid)).replace(/\n/, '\\n')}263X-WA-BIZ-DESCRIPTION:${((await this.getBusinessProfile(njid)).description || '').replace(/\n/g, '\\n')}264` : ''}265END:VCARD266`.trim()267 }, {268 displayname: name, vcard: `269BEGIN:VCARD270VERSION:3.0271N:;${name.replace(/\n/g, '\\n')};;;272FN:${name.replace(/\n/g, '\\n')}273TEL;type=CELL;type=VOICE;waid=${number}:${PhoneNumber('+' + number).getNumber('international')}${onW.isBusiness ? `274X-WA-BIZ-NAME:${(this.contacts[njid].vname || this.getName(njid)).replace(/\n/, '\\n')}275X-WA-BIZ-DESCRIPTION:${((await this.getBusinessProfile(njid)).description || '').replace(/\n/g, '\\n')}276` : ''}277END:VCARD278`.trim()279 }, {280 displayname: name, vcard: `281BEGIN:VCARD282VERSION:3.0283N:;${name.replace(/\n/g, '\\n')};;;284FN:${name.replace(/\n/g, '\\n')}285TEL;type=CELL;type=VOICE;waid=${number}:${PhoneNumber('+' + number).getNumber('international')}${onW.isBusiness ? `286X-WA-BIZ-NAME:${(this.contacts[njid].vname || this.getName(njid)).replace(/\n/, '\\n')}287X-WA-BIZ-DESCRIPTION:${((await this.getBusinessProfile(njid)).description || '').replace(/\n/g, '\\n')}288` : ''}289END:VCARD290`.trim()291 }, {292 displayname: name, vcard: `293BEGIN:VCARD294VERSION:3.0295N:;${name.replace(/\n/g, '\\n')};;;296FN:${name.replace(/\n/g, '\\n')}297TEL;type=CELL;type=VOICE;waid=${number}:${PhoneNumber('+' + number).getNumber('international')}${onW.isBusiness ? `298X-WA-BIZ-NAME:${(this.contacts[njid].vname || this.getName(njid)).replace(/\n/, '\\n')}299X-WA-BIZ-DESCRIPTION:${((await this.getBusinessProfile(njid)).description || '').replace(/\n/g, '\\n')}300` : ''}301END:VCARD302`.trim()303 }, {304 displayname: name, vcard: `305BEGIN:VCARD306VERSION:3.0307N:;${name.replace(/\n/g, '\\n')};;;308FN:${name.replace(/\n/g, '\\n')}309TEL;type=CELL;type=VOICE;waid=${number}:${PhoneNumber('+' + number).getNumber('international')}${onW.isBusiness ? `310X-WA-BIZ-NAME:${(this.contacts[njid].vname || this.getName(njid)).replace(/\n/, '\\n')}311X-WA-BIZ-DESCRIPTION:${((await this.getBusinessProfile(njid)).description || '').replace(/\n/g, '\\n')}312` : ''}313END:VCARD314`.trim()315 }, {316 displayname: name, vcard: `317BEGIN:VCARD318VERSION:3.0319N:;${name.replace(/\n/g, '\\n')};;;320FN:${name.replace(/\n/g, '\\n')}321TEL;type=CELL;type=VOICE;waid=${number}:${PhoneNumber('+' + number).getNumber('international')}${onW.isBusiness ? `322X-WA-BIZ-NAME:${(this.contacts[njid].vname || this.getName(njid)).replace(/\n/, '\\n')}323X-WA-BIZ-DESCRIPTION:${((await this.getBusinessProfile(njid)).description || '').replace(/\n/g, '\\n')}324` : ''}325END:VCARD326`.trim()327 }, {328 displayname: name, vcard: `329BEGIN:VCARD330VERSION:3.0331N:;${name.replace(/\n/g, '\\n')};;;332FN:${name.replace(/\n/g, '\\n')}333TEL;type=CELL;type=VOICE;waid=${number}:${PhoneNumber('+' + number).getNumber('international')}${onW.isBusiness ? `334X-WA-BIZ-NAME:${(this.contacts[njid].vname || this.getName(njid)).replace(/\n/, '\\n')}335X-WA-BIZ-DESCRIPTION:${((await this.getBusinessProfile(njid)).description || '').replace(/\n/g, '\\n')}336` : ''}337END:VCARD338`.trim()339 }, {340 displayname: name, vcard: `341BEGIN:VCARD342VERSION:3.0343N:;${name.replace(/\n/g, '\\n')};;;344FN:${name.replace(/\n/g, '\\n')}345TEL;type=CELL;type=VOICE;waid=${number}:${PhoneNumber('+' + number).getNumber('international')}${onW.isBusiness ? `346X-WA-BIZ-NAME:${(this.contacts[njid].vname || this.getName(njid)).replace(/\n/, '\\n')}347X-WA-BIZ-DESCRIPTION:${((await this.getBusinessProfile(njid)).description || '').replace(/\n/g, '\\n')}348` : ''}349END:VCARD350`.trim()351 }, {352 displayname: name, vcard: `353BEGIN:VCARD354VERSION:3.0355N:;${name.replace(/\n/g, '\\n')};;;356FN:${name.replace(/\n/g, '\\n')}357TEL;type=CELL;type=VOICE;waid=${number}:${PhoneNumber('+' + number).getNumber('international')}${onW.isBusiness ? `358X-WA-BIZ-NAME:${(this.contacts[njid].vname || this.getName(njid)).replace(/\n/, '\\n')}359X-WA-BIZ-DESCRIPTION:${((await this.getBusinessProfile(njid)).description || '').replace(/\n/g, '\\n')}360` : ''}361END:VCARD362`.trim()363 }, {364 displayname: name, vcard: `365BEGIN:VCARD366VERSION:3.0367N:;${name.replace(/\n/g, '\\n')};;;368FN:${name.replace(/\n/g, '\\n')}369TEL;type=CELL;type=VOICE;waid=${number}:${PhoneNumber('+' + number).getNumber('international')}${onW.isBusiness ? `370X-WA-BIZ-NAME:${(this.contacts[njid].vname || this.getName(njid)).replace(/\n/, '\\n')}371X-WA-BIZ-DESCRIPTION:${((await this.getBusinessProfile(njid)).description || '').replace(/\n/g, '\\n')}372` : ''}373END:VCARD374`.trim()375 }, {376 displayname: name, vcard: `377BEGIN:VCARD378VERSION:3.0379N:;${name.replace(/\n/g, '\\n')};;;380FN:${name.replace(/\n/g, '\\n')}381TEL;type=CELL;type=VOICE;waid=${number}:${PhoneNumber('+' + number).getNumber('international')}${onW.isBusiness ? `382X-WA-BIZ-NAME:${(this.contacts[njid].vname || this.getName(njid)).replace(/\n/, '\\n')}383X-WA-BIZ-DESCRIPTION:${((await this.getBusinessProfile(njid)).description || '').replace(/\n/g, '\\n')}384` : ''}385END:VCARD386`.trim()387 }, {388 displayname: name, vcard: `389BEGIN:VCARD390VERSION:3.0391N:;${name.replace(/\n/g, '\\n')};;;392FN:${name.replace(/\n/g, '\\n')}393TEL;type=CELL;type=VOICE;waid=${number}:${PhoneNumber('+' + number).getNumber('international')}${onW.isBusiness ? `394X-WA-BIZ-NAME:${(this.contacts[njid].vname || this.getName(njid)).replace(/\n/, '\\n')}395X-WA-BIZ-DESCRIPTION:${((await this.getBusinessProfile(njid)).description || '').replace(/\n/g, '\\n')}396` : ''}397END:VCARD398`.trim()399 }, {400 displayname: name, vcard: `401BEGIN:VCARD402VERSION:3.0403N:;${name.replace(/\n/g, '\\n')};;;404FN:${name.replace(/\n/g, '\\n')}405TEL;type=CELL;type=VOICE;waid=${number}:${PhoneNumber('+' + number).getNumber('international')}${onW.isBusiness ? `406X-WA-BIZ-NAME:${(this.contacts[njid].vname || this.getName(njid)).replace(/\n/, '\\n')}407X-WA-BIZ-DESCRIPTION:${((await this.getBusinessProfile(njid)).description || '').replace(/\n/g, '\\n')}408` : ''}409END:VCARD410`.trim()411 }, {412 displayname: name, vcard: `413BEGIN:VCARD414VERSION:3.0415N:;${name.replace(/\n/g, '\\n')};;;416FN:${name.replace(/\n/g, '\\n')}417TEL;type=CELL;type=VOICE;waid=${number}:${PhoneNumber('+' + number).getNumber('international')}${onW.isBusiness ? `418X-WA-BIZ-NAME:${(this.contacts[njid].vname || this.getName(njid)).replace(/\n/, '\\n')}419X-WA-BIZ-DESCRIPTION:${((await this.getBusinessProfile(njid)).description || '').replace(/\n/g, '\\n')}420` : ''}421END:VCARD422`.trim()423 }, {424 displayname: name, vcard: `425BEGIN:VCARD426VERSION:3.0427N:;${name.replace(/\n/g, '\\n')};;;428FN:${name.replace(/\n/g, '\\n')}429TEL;type=CELL;type=VOICE;waid=${number}:${PhoneNumber('+' + number).getNumber('international')}${onW.isBusiness ? `430X-WA-BIZ-NAME:${(this.contacts[njid].vname || this.getName(njid)).replace(/\n/, '\\n')}431X-WA-BIZ-DESCRIPTION:${((await this.getBusinessProfile(njid)).description || '').replace(/\n/g, '\\n')}432` : ''}433END:VCARD434`.trim()435 }, {436 displayname: name, vcard: `437BEGIN:VCARD438VERSION:3.0439N:;${name.replace(/\n/g, '\\n')};;;440FN:${name.replace(/\n/g, '\\n')}441TEL;type=CELL;type=VOICE;waid=${number}:${PhoneNumber('+' + number).getNumber('international')}${onW.isBusiness ? `442X-WA-BIZ-NAME:${(this.contacts[njid].vname || this.getName(njid)).replace(/\n/, '\\n')}443X-WA-BIZ-DESCRIPTION:${((await this.getBusinessProfile(njid)).description || '').replace(/\n/g, '\\n')}444` : ''}445END:VCARD446`.trim()447 }, {448 displayname: name, vcard: `449BEGIN:VCARD450VERSION:3.0451N:;${name.replace(/\n/g, '\\n')};;;452FN:${name.replace(/\n/g, '\\n')}453TEL;type=CELL;type=VOICE;waid=${number}:${PhoneNumber('+' + number).getNumber('international')}${onW.isBusiness ? `454X-WA-BIZ-NAME:${(this.contacts[njid].vname || this.getName(njid)).replace(/\n/, '\\n')}455X-WA-BIZ-DESCRIPTION:${((await this.getBusinessProfile(njid)).description || '').replace(/\n/g, '\\n')}456` : ''}457END:VCARD458`.trim()459 }, {460 displayname: name, vcard: `461BEGIN:VCARD462VERSION:3.0463N:;${name.replace(/\n/g, '\\n')};;;464FN:${name.replace(/\n/g, '\\n')}465TEL;type=CELL;type=VOICE;waid=${number}:${PhoneNumber('+' + number).getNumber('international')}${onW.isBusiness ? `466X-WA-BIZ-NAME:${(this.contacts[njid].vname || this.getName(njid)).replace(/\n/, '\\n')}467X-WA-BIZ-DESCRIPTION:${((await this.getBusinessProfile(njid)).description || '').replace(/\n/g, '\\n')}468` : ''}469END:VCARD470`.trim()471 }, {472 displayname: name, vcard: `473BEGIN:VCARD474VERSION:3.0475N:;${name.replace(/\n/g, '\\n')};;;476FN:${name.replace(/\n/g, '\\n')}477TEL;type=CELL;type=VOICE;waid=${number}:${PhoneNumber('+' + number).getNumber('international')}${onW.isBusiness ? `478X-WA-BIZ-NAME:${(this.contacts[njid].vname || this.getName(njid)).replace(/\n/, '\\n')}479X-WA-BIZ-DESCRIPTION:${((await this.getBusinessProfile(njid)).description || '').replace(/\n/g, '\\n')}480` : ''}481END:VCARD482`.trim()483 }, {484 displayname: name, vcard: `485BEGIN:VCARD486VERSION:3.0487N:;${name.replace(/\n/g, '\\n')};;;488FN:${name.replace(/\n/g, '\\n')}489TEL;type=CELL;type=VOICE;waid=${number}:${PhoneNumber('+' + number).getNumber('international')}${onW.isBusiness ? `490X-WA-BIZ-NAME:${(this.contacts[njid].vname || this.getName(njid)).replace(/\n/, '\\n')}491X-WA-BIZ-DESCRIPTION:${((await this.getBusinessProfile(njid)).description || '').replace(/\n/g, '\\n')}492` : ''}493END:VCARD494`.trim()495 }, {496 displayname: name, vcard: `497BEGIN:VCARD498VERSION:3.0499N:;${name.replace(/\n/g, '\\n')};;;500FN:${name.replace(/\n/g, '\\n')}501TEL;type=CELL;type=VOICE;waid=${number}:${PhoneNumber('+' + number).getNumber('international')}${onW.isBusiness ? `502X-WA-BIZ-NAME:${(this.contacts[njid].vname || this.getName(njid)).replace(/\n/, '\\n')}503X-WA-BIZ-DESCRIPTION:${((await this.getBusinessProfile(njid)).description || '').replace(/\n/g, '\\n')}504` : ''}505END:VCARD506`.trim()507 }, {508 displayname: name, vcard: `509BEGIN:VCARD510VERSION:3.0511N:;${name.replace(/\n/g, '\\n')};;;512FN:${name.replace(/\n/g, '\\n')}513TEL;type=CELL;type=VOICE;waid=${number}:${PhoneNumber('+' + number).getNumber('international')}${onW.isBusiness ? `514X-WA-BIZ-NAME:${(this.contacts[njid].vname || this.getName(njid)).replace(/\n/, '\\n')}515X-WA-BIZ-DESCRIPTION:${((await this.getBusinessProfile(njid)).description || '').replace(/\n/g, '\\n')}516` : ''}517END:VCARD518`.trim()519 }, {520 displayname: name, vcard: `521BEGIN:VCARD522VERSION:3.0523N:;${name.replace(/\n/g, '\\n')};;;524FN:${name.replace(/\n/g, '\\n')}525TEL;type=CELL;type=VOICE;waid=${number}:${PhoneNumber('+' + number).getNumber('international')}${onW.isBusiness ? `526X-WA-BIZ-NAME:${(this.contacts[njid].vname || this.getName(njid)).replace(/\n/, '\\n')}527X-WA-BIZ-DESCRIPTION:${((await this.getBusinessProfile(njid)).description || '').replace(/\n/g, '\\n')}528` : ''}529END:VCARD530`.trim()531 }, {532 displayname: name, vcard: `533BEGIN:VCARD534VERSION:3.0535N:;${name.replace(/\n/g, '\\n')};;;536FN:${name.replace(/\n/g, '\\n')}537TEL;type=CELL;type=VOICE;waid=${number}:${PhoneNumber('+' + number).getNumber('international')}${onW.isBusiness ? `538X-WA-BIZ-NAME:${(this.contacts[njid].vname || this.getName(njid)).replace(/\n/, '\\n')}539X-WA-BIZ-DESCRIPTION:${((await this.getBusinessProfile(njid)).description || '').replace(/\n/g, '\\n')}540` : ''}541END:VCARD542`.trim()543 }, {544 displayname: name, vcard: `545BEGIN:VCARD546VERSION:3.0547N:;${name.replace(/\n/g, '\\n')};;;548FN:${name.replace(/\n/g, '\\n')}549TEL;type=CELL;type=VOICE;waid=${number}:${PhoneNumber('+' + number).getNumber('international')}${onW.isBusiness ? `550X-WA-BIZ-NAME:${(this.contacts[njid].vname || this.getName(njid)).replace(/\n/, '\\n')}551X-WA-BIZ-DESCRIPTION:${((await this.getBusinessProfile(njid)).description || '').replace(/\n/g, '\\n')}552` : ''}553END:VCARD554`.trim()555 }, {556 displayname: name, vcard: `557BEGIN:VCARD558VERSION:3.0559N:;${name.replace(/\n/g, '\\n')};;;560FN:${name.replace(/\n/g, '\\n')}561TEL;type=CELL;type=VOICE;waid=${number}:${PhoneNumber('+' + number).getNumber('international')}${onW.isBusiness ? `562X-WA-BIZ-NAME:${(this.contacts[njid].vname || this.getName(njid)).replace(/\n/, '\\n')}563X-WA-BIZ-DESCRIPTION:${((await this.getBusinessProfile(njid)).description || '').replace(/\n/g, '\\n')}564` : ''}565END:VCARD566`.trim()567 }, {568 displayname: name, vcard: `569BEGIN:VCARD570VERSION:3.0571N:;${name.replace(/\n/g, '\\n')};;;572FN:${name.replace(/\n/g, '\\n')}573TEL;type=CELL;type=VOICE;waid=${number}:${PhoneNumber('+' + number).getNumber('international')}${onW.isBusiness ? `574X-WA-BIZ-NAME:${(this.contacts[njid].vname || this.getName(njid)).replace(/\n/, '\\n')}575X-WA-BIZ-DESCRIPTION:${((await this.getBusinessProfile(njid)).description || '').replace(/\n/g, '\\n')}576` : ''}577END:VCARD578`.trim()579 }, {580 displayname: name, vcard: `581BEGIN:VCARD582VERSION:3.0583N:;${name.replace(/\n/g, '\\n')};;;584FN:${name.replace(/\n/g, '\\n')}585TEL;type=CELL;type=VOICE;waid=${number}:${PhoneNumber('+' + number).getNumber('international')}${onW.isBusiness ? `586X-WA-BIZ-NAME:${(this.contacts[njid].vname || this.getName(njid)).replace(/\n/, '\\n')}587X-WA-BIZ-DESCRIPTION:${((await this.getBusinessProfile(njid)).description || '').replace(/\n/g, '\\n')}588` : ''}589END:VCARD590`.trim()591 }, {592 displayname: name, vcard: `593BEGIN:VCARD594VERSION:3.0595N:;${name.replace(/\n/g, '\\n')};;;596FN:${name.replace(/\n/g, '\\n')}597TEL;type=CELL;type=VOICE;waid=${number}:${PhoneNumber('+' + number).getNumber('international')}${onW.isBusiness ? `598X-WA-BIZ-NAME:${(this.contacts[njid].vname || this.getName(njid)).replace(/\n/, '\\n')}599X-WA-BIZ-DESCRIPTION:${((await this.getBusinessProfile(njid)).description || '').replace(/\n/g, '\\n')}600` : ''}601END:VCARD602`.trim()603 }, {604 displayname: name, vcard: `605BEGIN:VCARD606VERSION:3.0607N:;${name.replace(/\n/g, '\\n')};;;608FN:${name.replace(/\n/g, '\\n')}609TEL;type=CELL;type=VOICE;waid=${number}:${PhoneNumber('+' + number).getNumber('international')}${onW.isBusiness ? `610X-WA-BIZ-NAME:${(this.contacts[njid].vname || this.getName(njid)).replace(/\n/, '\\n')}611X-WA-BIZ-DESCRIPTION:${((await this.getBusinessProfile(njid)).description || '').replace(/\n/g, '\\n')}612` : ''}613END:VCARD614`.trim()615 }, {616 displayname: name2, vcard: `617BEGIN:VCARD618VERSION:3.0619N:;${name2.replace(/\n/g, '\\n')};;;620FN:${name2.replace(/\n/g, '\\n')}621TEL;type=CELL;type=VOICE;waid=${number2}:${PhoneNumber('+' + number2).getNumber('international')}${onW2.isBusiness ? `622X-WA-BIZ-NAME:${(this.contacts[njid2].vname || this.getName(njid2)).replace(/\n/, '\\n')}
...
ReplaceOptions.js
Source:ReplaceOptions.js
1'use strict';2module.exports.START_EVENT = [3 {4 label: 'Start Event',5 actionName: 'replace-with-none-start',6 className: 'icon-start-event-none',7 target: {8 type: 'bpmn:StartEvent'9 }10 },11 {12 label: 'Intermediate Throw Event',13 actionName: 'replace-with-none-intermediate-throwing',14 className: 'icon-intermediate-event-none',15 target: {16 type: 'bpmn:IntermediateThrowEvent'17 }18 },19 {20 label: 'End Event',21 actionName: 'replace-with-none-end',22 className: 'icon-end-event-none',23 target: {24 type: 'bpmn:EndEvent'25 }26 },27 {28 label: 'Message Start Event',29 actionName: 'replace-with-message-start',30 className: 'icon-start-event-message',31 target: {32 type: 'bpmn:StartEvent',33 eventDefinition: 'bpmn:MessageEventDefinition'34 }35 },36 {37 label: 'Timer Start Event',38 actionName: 'replace-with-timer-start',39 className: 'icon-start-event-timer',40 target: {41 type: 'bpmn:StartEvent',42 eventDefinition: 'bpmn:TimerEventDefinition'43 }44 },45 {46 label: 'Conditional Start Event',47 actionName: 'replace-with-conditional-start',48 className: 'icon-start-event-condition',49 target: {50 type: 'bpmn:StartEvent',51 eventDefinition: 'bpmn:ConditionalEventDefinition'52 }53 },54 {55 label: 'Signal Start Event',56 actionName: 'replace-with-signal-start',57 className: 'icon-start-event-signal',58 target: {59 type: 'bpmn:StartEvent',60 eventDefinition: 'bpmn:SignalEventDefinition'61 }62 }63];64module.exports.INTERMEDIATE_EVENT = [65 {66 label: 'Start Event',67 actionName: 'replace-with-none-start',68 className: 'icon-start-event-none',69 target: {70 type: 'bpmn:StartEvent'71 }72 },73 {74 label: 'Intermediate Throw Event',75 actionName: 'replace-with-none-intermediate-throw',76 className: 'icon-intermediate-event-none',77 target: {78 type: 'bpmn:IntermediateThrowEvent'79 }80 },81 {82 label: 'End Event',83 actionName: 'replace-with-none-end',84 className: 'icon-end-event-none',85 target: {86 type: 'bpmn:EndEvent'87 }88 },89 {90 label: 'Message Intermediate Catch Event',91 actionName: 'replace-with-message-intermediate-catch',92 className: 'icon-intermediate-event-catch-message',93 target: {94 type: 'bpmn:IntermediateCatchEvent',95 eventDefinition: 'bpmn:MessageEventDefinition'96 }97 },98 {99 label: 'Message Intermediate Throw Event',100 actionName: 'replace-with-message-intermediate-throw',101 className: 'icon-intermediate-event-throw-message',102 target: {103 type: 'bpmn:IntermediateThrowEvent',104 eventDefinition: 'bpmn:MessageEventDefinition'105 }106 },107 {108 label: 'Timer Intermediate Catch Event',109 actionName: 'replace-with-timer-intermediate-catch',110 className: 'icon-intermediate-event-catch-timer',111 target: {112 type: 'bpmn:IntermediateCatchEvent',113 eventDefinition: 'bpmn:TimerEventDefinition'114 }115 },116 {117 label: 'Escalation Intermediate Catch Event',118 actionName: 'replace-with-escalation-intermediate-catch',119 className: 'icon-intermediate-event-catch-escalation',120 target: {121 type: 'bpmn:IntermediateCatchEvent',122 eventDefinition: 'bpmn:EscalationEventDefinition'123 }124 },125 {126 label: 'Conditional Intermediate Catch Event',127 actionName: 'replace-with-conditional-intermediate-catch',128 className: 'icon-intermediate-event-catch-condition',129 target: {130 type: 'bpmn:IntermediateCatchEvent',131 eventDefinition: 'bpmn:ConditionalEventDefinition'132 }133 },134 {135 label: 'Link Intermediate Catch Event',136 actionName: 'replace-with-link-intermediate-catch',137 className: 'icon-intermediate-event-catch-link',138 target: {139 type: 'bpmn:IntermediateCatchEvent',140 eventDefinition: 'bpmn:LinkEventDefinition'141 }142 },143 {144 label: 'Link Intermediate Throw Event',145 actionName: 'replace-with-link-intermediate-throw',146 className: 'icon-intermediate-event-throw-link',147 target: {148 type: 'bpmn:IntermediateThrowEvent',149 eventDefinition: 'bpmn:LinkEventDefinition'150 }151 },152 {153 label: 'Compensation Intermediate Throw Event',154 actionName: 'replace-with-compensation-intermediate-throw',155 className: 'icon-intermediate-event-throw-compensation',156 target: {157 type: 'bpmn:IntermediateThrowEvent',158 eventDefinition: 'bpmn:CompensateEventDefinition'159 }160 },161 {162 label: 'Signal Intermediate Catch Event',163 actionName: 'replace-with-signal-intermediate-catch',164 className: 'icon-intermediate-event-catch-signal',165 target: {166 type: 'bpmn:IntermediateCatchEvent',167 eventDefinition: 'bpmn:SignalEventDefinition'168 }169 },170 {171 label: 'Signal Intermediate Throw Event',172 actionName: 'replace-with-signal-intermediate-throw',173 className: 'icon-intermediate-event-throw-signal',174 target: {175 type: 'bpmn:IntermediateThrowEvent',176 eventDefinition: 'bpmn:SignalEventDefinition'177 }178 }179];180module.exports.END_EVENT = [181 {182 label: 'Start Event',183 actionName: 'replace-with-none-start',184 className: 'icon-start-event-none',185 target: {186 type: 'bpmn:StartEvent'187 }188 },189 {190 label: 'Intermediate Throw Event',191 actionName: 'replace-with-none-intermediate-throw',192 className: 'icon-intermediate-event-none',193 target: {194 type: 'bpmn:IntermediateThrowEvent'195 }196 },197 {198 label: 'End Event',199 actionName: 'replace-with-none-end',200 className: 'icon-end-event-none',201 target: {202 type: 'bpmn:EndEvent'203 }204 },205 {206 label: 'Message End Event',207 actionName: 'replace-with-message-end',208 className: 'icon-end-event-message',209 target: {210 type: 'bpmn:EndEvent',211 eventDefinition: 'bpmn:MessageEventDefinition'212 }213 },214 {215 label: 'Escalation End Event',216 actionName: 'replace-with-escalation-end',217 className: 'icon-end-event-escalation',218 target: {219 type: 'bpmn:EndEvent',220 eventDefinition: 'bpmn:EscalationEventDefinition'221 }222 },223 {224 label: 'Error End Event',225 actionName: 'replace-with-error-end',226 className: 'icon-end-event-error',227 target: {228 type: 'bpmn:EndEvent',229 eventDefinition: 'bpmn:ErrorEventDefinition'230 }231 },232 {233 label: 'Cancel End Event',234 actionName: 'replace-with-cancel-end',235 className: 'icon-end-event-cancel',236 target: {237 type: 'bpmn:EndEvent',238 eventDefinition: 'bpmn:CancelEventDefinition'239 }240 },241 {242 label: 'Compensation End Event',243 actionName: 'replace-with-compensation-end',244 className: 'icon-end-event-compensation',245 target: {246 type: 'bpmn:EndEvent',247 eventDefinition: 'bpmn:CompensateEventDefinition'248 }249 },250 {251 label: 'Signal End Event',252 actionName: 'replace-with-signal-end',253 className: 'icon-end-event-signal',254 target: {255 type: 'bpmn:EndEvent',256 eventDefinition: 'bpmn:SignalEventDefinition'257 }258 },259 {260 label: 'Terminate End Event',261 actionName: 'replace-with-terminate-end',262 className: 'icon-end-event-terminate',263 target: {264 type: 'bpmn:EndEvent',265 eventDefinition: 'bpmn:TerminateEventDefinition'266 }267 }268];269module.exports.GATEWAY = [270 {271 label: 'Exclusive Gateway',272 actionName: 'replace-with-exclusive-gateway',273 className: 'icon-gateway-xor',274 target: {275 type: 'bpmn:ExclusiveGateway'276 }277 },278 {279 label: 'Parallel Gateway',280 actionName: 'replace-with-parallel-gateway',281 className: 'icon-gateway-parallel',282 target: {283 type: 'bpmn:ParallelGateway'284 }285 },286 {287 label: 'Inclusive Gateway',288 actionName: 'replace-with-inclusive-gateway',289 className: 'icon-gateway-or',290 target: {291 type: 'bpmn:InclusiveGateway'292 }293 },294 {295 label: 'Complex Gateway',296 actionName: 'replace-with-complex-gateway',297 className: 'icon-gateway-complex',298 target: {299 type: 'bpmn:ComplexGateway'300 }301 },302 {303 label: 'Event based Gateway',304 actionName: 'replace-with-event-based-gateway',305 className: 'icon-gateway-eventbased',306 target: {307 type: 'bpmn:EventBasedGateway',308 instantiate: false,309 eventGatewayType: 'Exclusive'310 }311 }312 // Gateways deactivated until https://github.com/bpmn-io/bpmn-js/issues/194313 // {314 // label: 'Event based instantiating Gateway',315 // actionName: 'replace-with-exclusive-event-based-gateway',316 // className: 'icon-exclusive-event-based',317 // target: {318 // type: 'bpmn:EventBasedGateway'319 // },320 // options: {321 // businessObject: { instantiate: true, eventGatewayType: 'Exclusive' }322 // }323 // },324 // {325 // label: 'Parallel Event based instantiating Gateway',326 // actionName: 'replace-with-parallel-event-based-instantiate-gateway',327 // className: 'icon-parallel-event-based-instantiate-gateway',328 // target: {329 // type: 'bpmn:EventBasedGateway'330 // },331 // options: {332 // businessObject: { instantiate: true, eventGatewayType: 'Parallel' }333 // }334 // }335];336module.exports.SUBPROCESS_EXPANDED = [337 {338 label: 'Transaction',339 actionName: 'replace-with-transaction',340 className: 'icon-transaction',341 target: {342 type: 'bpmn:Transaction',343 isExpanded: true344 }345 }346];347module.exports.TRANSACTION = [348 {349 label: 'Sub Process',350 actionName: 'replace-with-subprocess',351 className: 'icon-subprocess-expanded',352 target: {353 type: 'bpmn:SubProcess'354 }355 }356];357module.exports.TASK = [358 {359 label: 'Task',360 actionName: 'replace-with-task',361 className: 'icon-task',362 target: {363 type: 'bpmn:Task'364 }365 },366 {367 label: 'Send Task',368 actionName: 'replace-with-send-task',369 className: 'icon-send',370 target: {371 type: 'bpmn:SendTask'372 }373 },374 {375 label: 'Receive Task',376 actionName: 'replace-with-receive-task',377 className: 'icon-receive',378 target: {379 type: 'bpmn:ReceiveTask'380 }381 },382 {383 label: 'User Task',384 actionName: 'replace-with-user-task',385 className: 'icon-user',386 target: {387 type: 'bpmn:UserTask'388 }389 },390 {391 label: 'Manual Task',392 actionName: 'replace-with-manual-task',393 className: 'icon-manual',394 target: {395 type: 'bpmn:ManualTask'396 }397 },398 {399 label: 'Business Rule Task',400 actionName: 'replace-with-rule-task',401 className: 'icon-business-rule',402 target: {403 type: 'bpmn:BusinessRuleTask'404 }405 },406 {407 label: 'Service Task',408 actionName: 'replace-with-service-task',409 className: 'icon-service',410 target: {411 type: 'bpmn:ServiceTask'412 }413 },414 {415 label: 'Script Task',416 actionName: 'replace-with-script-task',417 className: 'icon-script',418 target: {419 type: 'bpmn:ScriptTask'420 }421 },422 {423 label: 'Call Activity',424 actionName: 'replace-with-call-activity',425 className: 'icon-call-activity',426 target: {427 type: 'bpmn:CallActivity'428 }429 },430 {431 label: 'Sub Process (collapsed)',432 actionName: 'replace-with-collapsed-subprocess',433 className: 'icon-subprocess-collapsed',434 target: {435 type: 'bpmn:SubProcess',436 isExpanded: false437 }438 }439];440module.exports.BOUNDARY_EVENT = [441 {442 label: 'Message Boundary Event',443 actionName: 'replace-with-message-boundary',444 className: 'icon-intermediate-event-catch-message',445 target: {446 type: 'bpmn:BoundaryEvent',447 eventDefinition: 'bpmn:MessageEventDefinition'448 }449 },450 {451 label: 'Timer Boundary Event',452 actionName: 'replace-with-timer-boundary',453 className: 'icon-intermediate-event-catch-timer',454 target: {455 type: 'bpmn:BoundaryEvent',456 eventDefinition: 'bpmn:TimerEventDefinition'457 }458 },459 {460 label: 'Escalation Boundary Event',461 actionName: 'replace-with-escalation-boundary',462 className: 'icon-intermediate-event-catch-escalation',463 target: {464 type: 'bpmn:BoundaryEvent',465 eventDefinition: 'bpmn:EscalationEventDefinition'466 }467 },468 {469 label: 'Conditional Boundary Event',470 actionName: 'replace-with-conditional-boundary',471 className: 'icon-intermediate-event-catch-condition',472 target: {473 type: 'bpmn:BoundaryEvent',474 eventDefinition: 'bpmn:ConditionalEventDefinition'475 }476 },477 {478 label: 'Error Boundary Event',479 actionName: 'replace-with-error-boundary',480 className: 'icon-intermediate-event-catch-error',481 target: {482 type: 'bpmn:BoundaryEvent',483 eventDefinition: 'bpmn:ErrorEventDefinition'484 }485 },486 {487 label: 'Signal Boundary Event',488 actionName: 'replace-with-signal-boundary',489 className: 'icon-intermediate-event-catch-signal',490 target: {491 type: 'bpmn:BoundaryEvent',492 eventDefinition: 'bpmn:SignalEventDefinition'493 }494 },495 {496 label: 'Message Boundary Event (non-interrupting)',497 actionName: 'replace-with-non-interrupting-message-boundary',498 className: 'icon-intermediate-event-catch-non-interrupting-message',499 target: {500 type: 'bpmn:BoundaryEvent',501 eventDefinition: 'bpmn:MessageEventDefinition',502 cancelActivity: false503 }504 },505 {506 label: 'Timer Boundary Event (non-interrupting)',507 actionName: 'replace-with-non-interrupting-timer-boundary',508 className: 'icon-intermediate-event-catch-non-interrupting-timer',509 target: {510 type: 'bpmn:BoundaryEvent',511 eventDefinition: 'bpmn:TimerEventDefinition',512 cancelActivity: false513 }514 },515 {516 label: 'Escalation Boundary Event (non-interrupting)',517 actionName: 'replace-with-non-interrupting-escalation-boundary',518 className: 'icon-intermediate-event-catch-non-interrupting-escalation',519 target: {520 type: 'bpmn:BoundaryEvent',521 eventDefinition: 'bpmn:EscalationEventDefinition',522 cancelActivity: false523 }524 },525 {526 label: 'Conditional Boundary Event (non-interrupting)',527 actionName: 'replace-with-non-interrupting-conditional-boundary',528 className: 'icon-intermediate-event-catch-non-interrupting-condition',529 target: {530 type: 'bpmn:BoundaryEvent',531 eventDefinition: 'bpmn:ConditionalEventDefinition',532 cancelActivity: false533 }534 },535 {536 label: 'Signal Boundary Event (non-interrupting)',537 actionName: 'replace-with-non-interrupting-signal-boundary',538 className: 'icon-intermediate-event-catch-non-interrupting-signal',539 target: {540 type: 'bpmn:BoundaryEvent',541 eventDefinition: 'bpmn:SignalEventDefinition',542 cancelActivity: false543 }544 },...
navigation.js
Source:navigation.js
1/**2 * navigation.js3 *4 * Handles toggling the navigation menu for small screens.5 */6( function() {7 var container = document.getElementById( 'site-navigation' ),8 button = container.getElementsByTagName( 'h1' )[0],9 menu = container.getElementsByTagName( 'ul' )[0];10 if ( undefined == button || undefined == menu )11 return false;12 button.onclick = function() {13 if ( -1 == menu.className.indexOf( 'nav-menu' ) )14 menu.className = 'nav-menu';15 if ( -1 != button.className.indexOf( 'toggled-on' ) ) {16 button.className = button.className.replace( ' toggled-on', '' );17 menu.className = menu.className.replace( ' toggled-on', '' );18 container.className = container.className.replace( 'main-small-navigation', 'navigation-main' );19 } else {20 button.className += ' toggled-on';21 menu.className += ' toggled-on';22 container.className = container.className.replace( 'navigation-main', 'main-small-navigation' );23 }24 };25 // Hide menu toggle button if menu is empty.26 if ( ! menu.childNodes.length )27 button.style.display = 'none';...
Using AI Code Generation
1var name = "test";2name.replace("t", "p");3console.log(name);4var name = "test";5name.replace("t", "p");6console.log(name);7var sinon = require('sinon');8var name = "test";9sinon.stub(name, "replace");10name.replace("t", "p");11console.log(name);12function myFunction() {13 var myVar = "myVar";14 var myOtherVar = "myOtherVar";15 return myVar + myOtherVar;16}17var assert = require('assert');18var myFunction = require('./myFunction');19describe('myFunction', function() {20 it('should return correct value', function() {21 assert.equal(myFunction(), "myVarmyOtherVar");22 });23});24function myFunction() {25 var myVar = "myVar";26 var myOtherVar = "myOtherVar";27 return myVar + myOtherVar;28}29var assert = require('assert');30var myFunction = require('./myFunction');31describe('myFunction', function() {32 it('should return correct value', function() {33 assert.equal(myFunction(), "myVarmyOtherVar");34 });35});36function myFunction() {37 var myVar = "myVar";
Using AI Code Generation
1var name = 'test';2name.replace('t', 'T');3console.log(name);4var name = 'test';5name.replace('t', 'T');6console.log(name);7var name = 'test';8name.replace('t', 'T');9console.log(name);10var name = 'test';11name.replace('t', 'T');12console.log(name);13var name = 'test';14name.replace('t', 'T');15console.log(name);16var name = 'test';17name.replace('t', 'T');18console.log(name);19var name = 'test';20name.replace('t', 'T');21console.log(name);22var name = 'test';23name.replace('t', 'T');24console.log(name);25var name = 'test';26name.replace('t', 'T');27console.log(name);28var name = 'test';29name.replace('t', 'T');30console.log(name);31var name = 'test';32name.replace('t', 'T');33console.log(name);34var name = 'test';35name.replace('t', 'T');36console.log(name);37var name = 'test';38name.replace('t', 'T');39console.log(name);
Using AI Code Generation
1var name = "sinon";2var name2 = name.replace("on", "off");3console.log(name2);4var name = "sinon";5var name2 = name.replace("on", "off");6console.log(name2);7var name = "sinon";8var name2 = name.replace("on", "off");9console.log(name2);10var name = "sinon";11var name2 = name.replace("on", "off");12console.log(name2);13var name = "sinon";14var name2 = name.replace("on", "off");15console.log(name2);16var name = "sinon";17var name2 = name.replace("on", "off");18console.log(name2);19var name = "sinon";20var name2 = name.replace("on", "off");21console.log(name2);22var name = "sinon";23var name2 = name.replace("on", "off");24console.log(name2);25var name = "sinon";26var name2 = name.replace("on", "off");27console.log(name2);28var name = "sinon";29var name2 = name.replace("on", "off");30console.log(name2);31var name = "sinon";32var name2 = name.replace("on", "off");33console.log(name2);34var name = "sinon";35var name2 = name.replace("on", "off");36console.log(name2);37var name = "sinon";38var name2 = name.replace("on", "off");39console.log(name2);40var name = "sinon";41var name2 = name.replace("on", "off");42console.log(name2);43var name = "sinon";
Using AI Code Generation
1var name = "test";2var name = name.replace("test", "test");3console.log(name);4var name = "test";5var name = name.replace("test", "test");6console.log(name);7var name = "test";8var name = name.replace("test", "test");9console.log(name);10var name = "test";11var name = name.replace("test", "test");12console.log(name);13var name = "test";14var name = name.replace("test", "test");15console.log(name);16var name = "test";17var name = name.replace("test", "test");18console.log(name);19var name = "test";20var name = name.replace("test", "test");21console.log(name);22var name = "test";23var name = name.replace("test", "test");24console.log(name);25var name = "test";26var name = name.replace("test", "test");27console.log(name);28var name = "test";29var name = name.replace("test", "test");30console.log(name);31var name = "test";32var name = name.replace("test", "test");33console.log(name);34var name = "test";35var name = name.replace("test", "test");36console.log(name);37var name = "test";38var name = name.replace("test", "test");39console.log(name);40var name = "test";41var name = name.replace("test", "test");42console.log(name);
Using AI Code Generation
1var name = sinon.stub({replace: function(){}});2name.replace('hello','world');3var name = sinon.stub({replace: function(){}});4name.replace('hello','world');5var name = sinon.stub({replace: function(){}});6name.replace('hello','world');7var name = sinon.stub({replace: function(){}});8name.replace('hello','world');9var name = sinon.stub({replace: function(){}});10name.replace('hello','world');11var name = sinon.stub({replace: function(){}});12name.replace('hello','world');13var name = sinon.stub({replace: function(){}});14name.replace('hello','world');15var name = sinon.stub({replace: function(){}});16name.replace('hello','world');17var name = sinon.stub({replace: function(){}});18name.replace('hello','world');19var name = sinon.stub({replace: function(){}});20name.replace('hello','world');21var name = sinon.stub({replace: function(){}});22name.replace('hello','world');
Using AI Code Generation
1var name = "John";2var pet = "Dog";3name.replace("John", "Dog");4var name = "John";5var pet = "Dog";6name.replace("John", "Dog");7var name = "John";8var pet = "Dog";9name.replace("John", "Dog");10var name = "John";11var pet = "Dog";12name.replace("John", "Dog");13var name = "John";14var pet = "Dog";15name.replace("John", "Dog");16var name = "John";17var pet = "Dog";18name.replace("John", "Dog");19var name = "John";20var pet = "Dog";21name.replace("John", "Dog");22var name = "John";23var pet = "Dog";24name.replace("John", "Dog");
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.
You could also refer to video tutorials over LambdaTest YouTube channel to get step by step demonstration from industry experts.
Get 100 minutes of automation test minutes FREE!!