| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409 |
- 'use strict';
- function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }
- var syntaxJsx = _interopDefault(require('babel-plugin-syntax-jsx'));
- var cov_10u8a89794 = function () {
- var path = '/home/nick/Projects/babel-plugin-jsx-event-modifiers/src/group-event-attributes.js',
- hash = '27cab2aae265cb2fd54e5c36a9c17d8fe4d5cfc5',
- global = new Function('return this')(),
- gcv = '__coverage__',
- coverageData = {
- path: '/home/nick/Projects/babel-plugin-jsx-event-modifiers/src/group-event-attributes.js',
- statementMap: {
- '0': {
- start: {
- line: 1,
- column: 20
- },
- end: {
- line: 42,
- column: 1
- }
- },
- '1': {
- start: {
- line: 2,
- column: 2
- },
- end: {
- line: 4,
- column: 3
- }
- },
- '2': {
- start: {
- line: 3,
- column: 4
- },
- end: {
- line: 3,
- column: 14
- }
- },
- '3': {
- start: {
- line: 6,
- column: 23
- },
- end: {
- line: 6,
- column: 67
- }
- },
- '4': {
- start: {
- line: 7,
- column: 16
- },
- end: {
- line: 7,
- column: 112
- }
- },
- '5': {
- start: {
- line: 8,
- column: 20
- },
- end: {
- line: 8,
- column: 117
- }
- },
- '6': {
- start: {
- line: 10,
- column: 2
- },
- end: {
- line: 12,
- column: 3
- }
- },
- '7': {
- start: {
- line: 11,
- column: 4
- },
- end: {
- line: 11,
- column: 14
- }
- },
- '8': {
- start: {
- line: 14,
- column: 16
- },
- end: {
- line: 14,
- column: 38
- }
- },
- '9': {
- start: {
- line: 16,
- column: 2
- },
- end: {
- line: 16,
- column: 20
- }
- },
- '10': {
- start: {
- line: 17,
- column: 2
- },
- end: {
- line: 19,
- column: 3
- }
- },
- '11': {
- start: {
- line: 18,
- column: 4
- },
- end: {
- line: 18,
- column: 14
- }
- },
- '12': {
- start: {
- line: 21,
- column: 21
- },
- end: {
- line: 21,
- column: 49
- }
- },
- '13': {
- start: {
- line: 23,
- column: 18
- },
- end: {
- line: 23,
- column: 33
- }
- },
- '14': {
- start: {
- line: 24,
- column: 2
- },
- end: {
- line: 26,
- column: 3
- }
- },
- '15': {
- start: {
- line: 25,
- column: 4
- },
- end: {
- line: 25,
- column: 35
- }
- },
- '16': {
- start: {
- line: 27,
- column: 2
- },
- end: {
- line: 27,
- column: 62
- }
- },
- '17': {
- start: {
- line: 28,
- column: 2
- },
- end: {
- line: 30,
- column: 3
- }
- },
- '18': {
- start: {
- line: 29,
- column: 4
- },
- end: {
- line: 29,
- column: 31
- }
- },
- '19': {
- start: {
- line: 31,
- column: 2
- },
- end: {
- line: 33,
- column: 3
- }
- },
- '20': {
- start: {
- line: 32,
- column: 4
- },
- end: {
- line: 32,
- column: 31
- }
- },
- '21': {
- start: {
- line: 35,
- column: 2
- },
- end: {
- line: 37,
- column: 3
- }
- },
- '22': {
- start: {
- line: 36,
- column: 4
- },
- end: {
- line: 36,
- column: 23
- }
- },
- '23': {
- start: {
- line: 39,
- column: 2
- },
- end: {
- line: 39,
- column: 59
- }
- },
- '24': {
- start: {
- line: 41,
- column: 2
- },
- end: {
- line: 41,
- column: 12
- }
- }
- },
- fnMap: {
- '0': {
- name: '(anonymous_0)',
- decl: {
- start: {
- line: 1,
- column: 15
- },
- end: {
- line: 1,
- column: 16
- }
- },
- loc: {
- start: {
- line: 1,
- column: 20
- },
- end: {
- line: 42,
- column: 1
- }
- },
- line: 1
- },
- '1': {
- name: '(anonymous_1)',
- decl: {
- start: {
- line: 1,
- column: 20
- },
- end: {
- line: 1,
- column: 21
- }
- },
- loc: {
- start: {
- line: 1,
- column: 40
- },
- end: {
- line: 42,
- column: 1
- }
- },
- line: 1
- }
- },
- branchMap: {
- '0': {
- loc: {
- start: {
- line: 2,
- column: 2
- },
- end: {
- line: 4,
- column: 3
- }
- },
- type: 'if',
- locations: [{
- start: {
- line: 2,
- column: 2
- },
- end: {
- line: 4,
- column: 3
- }
- }, {
- start: {
- line: 2,
- column: 2
- },
- end: {
- line: 4,
- column: 3
- }
- }],
- line: 2
- },
- '1': {
- loc: {
- start: {
- line: 7,
- column: 17
- },
- end: {
- line: 7,
- column: 94
- }
- },
- type: 'cond-expr',
- locations: [{
- start: {
- line: 7,
- column: 32
- },
- end: {
- line: 7,
- column: 70
- }
- }, {
- start: {
- line: 7,
- column: 73
- },
- end: {
- line: 7,
- column: 94
- }
- }],
- line: 7
- },
- '2': {
- loc: {
- start: {
- line: 8,
- column: 20
- },
- end: {
- line: 8,
- column: 117
- }
- },
- type: 'cond-expr',
- locations: [{
- start: {
- line: 8,
- column: 35
- },
- end: {
- line: 8,
- column: 105
- }
- }, {
- start: {
- line: 8,
- column: 108
- },
- end: {
- line: 8,
- column: 117
- }
- }],
- line: 8
- },
- '3': {
- loc: {
- start: {
- line: 10,
- column: 2
- },
- end: {
- line: 12,
- column: 3
- }
- },
- type: 'if',
- locations: [{
- start: {
- line: 10,
- column: 2
- },
- end: {
- line: 12,
- column: 3
- }
- }, {
- start: {
- line: 10,
- column: 2
- },
- end: {
- line: 12,
- column: 3
- }
- }],
- line: 10
- },
- '4': {
- loc: {
- start: {
- line: 17,
- column: 2
- },
- end: {
- line: 19,
- column: 3
- }
- },
- type: 'if',
- locations: [{
- start: {
- line: 17,
- column: 2
- },
- end: {
- line: 19,
- column: 3
- }
- }, {
- start: {
- line: 17,
- column: 2
- },
- end: {
- line: 19,
- column: 3
- }
- }],
- line: 17
- },
- '5': {
- loc: {
- start: {
- line: 24,
- column: 2
- },
- end: {
- line: 26,
- column: 3
- }
- },
- type: 'if',
- locations: [{
- start: {
- line: 24,
- column: 2
- },
- end: {
- line: 26,
- column: 3
- }
- }, {
- start: {
- line: 24,
- column: 2
- },
- end: {
- line: 26,
- column: 3
- }
- }],
- line: 24
- },
- '6': {
- loc: {
- start: {
- line: 28,
- column: 2
- },
- end: {
- line: 30,
- column: 3
- }
- },
- type: 'if',
- locations: [{
- start: {
- line: 28,
- column: 2
- },
- end: {
- line: 30,
- column: 3
- }
- }, {
- start: {
- line: 28,
- column: 2
- },
- end: {
- line: 30,
- column: 3
- }
- }],
- line: 28
- },
- '7': {
- loc: {
- start: {
- line: 31,
- column: 2
- },
- end: {
- line: 33,
- column: 3
- }
- },
- type: 'if',
- locations: [{
- start: {
- line: 31,
- column: 2
- },
- end: {
- line: 33,
- column: 3
- }
- }, {
- start: {
- line: 31,
- column: 2
- },
- end: {
- line: 33,
- column: 3
- }
- }],
- line: 31
- },
- '8': {
- loc: {
- start: {
- line: 35,
- column: 2
- },
- end: {
- line: 37,
- column: 3
- }
- },
- type: 'if',
- locations: [{
- start: {
- line: 35,
- column: 2
- },
- end: {
- line: 37,
- column: 3
- }
- }, {
- start: {
- line: 35,
- column: 2
- },
- end: {
- line: 37,
- column: 3
- }
- }],
- line: 35
- }
- },
- s: {
- '0': 0,
- '1': 0,
- '2': 0,
- '3': 0,
- '4': 0,
- '5': 0,
- '6': 0,
- '7': 0,
- '8': 0,
- '9': 0,
- '10': 0,
- '11': 0,
- '12': 0,
- '13': 0,
- '14': 0,
- '15': 0,
- '16': 0,
- '17': 0,
- '18': 0,
- '19': 0,
- '20': 0,
- '21': 0,
- '22': 0,
- '23': 0,
- '24': 0
- },
- f: {
- '0': 0,
- '1': 0
- },
- b: {
- '0': [0, 0],
- '1': [0, 0],
- '2': [0, 0],
- '3': [0, 0],
- '4': [0, 0],
- '5': [0, 0],
- '6': [0, 0],
- '7': [0, 0],
- '8': [0, 0]
- },
- _coverageSchema: '332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'
- },
- coverage = global[gcv] || (global[gcv] = {});
- if (coverage[path] && coverage[path].hash === hash) {
- return coverage[path];
- }
- coverageData.hash = hash;
- return coverage[path] = coverageData;
- }();
- var groupEventAttributes = (function (t) {
- cov_10u8a89794.f[0]++;
- cov_10u8a89794.s[0]++;
- return function (obj, attribute) {
- cov_10u8a89794.f[1]++;
- cov_10u8a89794.s[1]++;
- if (t.isJSXSpreadAttribute(attribute)) {
- cov_10u8a89794.b[0][0]++;
- cov_10u8a89794.s[2]++;
- return obj;
- } else {
- cov_10u8a89794.b[0][1]++;
- }
- var isNamespaced = (cov_10u8a89794.s[3]++, t.isJSXNamespacedName(attribute.get('name')));
- var event = (cov_10u8a89794.s[4]++, (isNamespaced ? (cov_10u8a89794.b[1][0]++, attribute.get('name').get('namespace')) : (cov_10u8a89794.b[1][1]++, attribute.get('name'))).get('name').node);
- var modifiers = (cov_10u8a89794.s[5]++, isNamespaced ? (cov_10u8a89794.b[2][0]++, new Set(attribute.get('name').get('name').get('name').node.split('-'))) : (cov_10u8a89794.b[2][1]++, new Set()));
- cov_10u8a89794.s[6]++;
- if (event.indexOf('on') !== 0) {
- cov_10u8a89794.b[3][0]++;
- cov_10u8a89794.s[7]++;
- return obj;
- } else {
- cov_10u8a89794.b[3][1]++;
- }
- var value = (cov_10u8a89794.s[8]++, attribute.get('value'));
- cov_10u8a89794.s[9]++;
- attribute.remove();
- cov_10u8a89794.s[10]++;
- if (!t.isJSXExpressionContainer(value)) {
- cov_10u8a89794.b[4][0]++;
- cov_10u8a89794.s[11]++;
- return obj;
- } else {
- cov_10u8a89794.b[4][1]++;
- }
- var expression = (cov_10u8a89794.s[12]++, value.get('expression').node);
- var eventName = (cov_10u8a89794.s[13]++, event.substr(2));
- cov_10u8a89794.s[14]++;
- if (eventName[0] === '-') {
- cov_10u8a89794.b[5][0]++;
- cov_10u8a89794.s[15]++;
- eventName = eventName.substr(1);
- } else {
- cov_10u8a89794.b[5][1]++;
- }
- cov_10u8a89794.s[16]++;
- eventName = eventName[0].toLowerCase() + eventName.substr(1);
- cov_10u8a89794.s[17]++;
- if (modifiers.has('capture')) {
- cov_10u8a89794.b[6][0]++;
- cov_10u8a89794.s[18]++;
- eventName = '!' + eventName;
- } else {
- cov_10u8a89794.b[6][1]++;
- }
- cov_10u8a89794.s[19]++;
- if (modifiers.has('once')) {
- cov_10u8a89794.b[7][0]++;
- cov_10u8a89794.s[20]++;
- eventName = '~' + eventName;
- } else {
- cov_10u8a89794.b[7][1]++;
- }
- cov_10u8a89794.s[21]++;
- if (!obj[eventName]) {
- cov_10u8a89794.b[8][0]++;
- cov_10u8a89794.s[22]++;
- obj[eventName] = [];
- } else {
- cov_10u8a89794.b[8][1]++;
- }
- cov_10u8a89794.s[23]++;
- obj[eventName].push({ modifiers, expression, attribute });
- cov_10u8a89794.s[24]++;
- return obj;
- };
- });
- var cov_1rltg07vsx = function () {
- var path = '/home/nick/Projects/babel-plugin-jsx-event-modifiers/src/constants.js',
- hash = '5e383c3f2b1f822d166abc9d641e15bf0fc99eba',
- global = new Function('return this')(),
- gcv = '__coverage__',
- coverageData = {
- path: '/home/nick/Projects/babel-plugin-jsx-event-modifiers/src/constants.js',
- statementMap: {
- '0': {
- start: {
- line: 1,
- column: 23
- },
- end: {
- line: 11,
- column: 1
- }
- },
- '1': {
- start: {
- line: 13,
- column: 28
- },
- end: {
- line: 13,
- column: 60
- }
- },
- '2': {
- start: {
- line: 15,
- column: 25
- },
- end: {
- line: 15,
- column: 38
- }
- }
- },
- fnMap: {},
- branchMap: {},
- s: {
- '0': 0,
- '1': 0,
- '2': 0
- },
- f: {},
- b: {},
- _coverageSchema: '332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'
- },
- coverage = global[gcv] || (global[gcv] = {});
- if (coverage[path] && coverage[path].hash === hash) {
- return coverage[path];
- }
- coverageData.hash = hash;
- return coverage[path] = coverageData;
- }();
- var aliases = (cov_1rltg07vsx.s[0]++, {
- esc: 27,
- tab: 9,
- enter: 13,
- space: 32,
- up: 38,
- left: 37,
- right: 39,
- down: 40,
- delete: [8, 46]
- });
- var keyModifiers = (cov_1rltg07vsx.s[1]++, ['ctrl', 'shift', 'alt', 'meta']);
- var keyCodeRE = (cov_1rltg07vsx.s[2]++, /^k(\d{1,})$/);
- var cov_28cz23z0dk = function () {
- var path = '/home/nick/Projects/babel-plugin-jsx-event-modifiers/src/generate-binding-body.js',
- hash = '034116a2beaa240e6479f1fafe6f22bfb8397848',
- global = new Function('return this')(),
- gcv = '__coverage__',
- coverageData = {
- path: '/home/nick/Projects/babel-plugin-jsx-event-modifiers/src/generate-binding-body.js',
- statementMap: {
- '0': {
- start: {
- line: 4,
- column: 24
- },
- end: {
- line: 6,
- column: 3
- }
- },
- '1': {
- start: {
- line: 7,
- column: 17
- },
- end: {
- line: 7,
- column: 19
- }
- },
- '2': {
- start: {
- line: 8,
- column: 21
- },
- end: {
- line: 8,
- column: 23
- }
- },
- '3': {
- start: {
- line: 9,
- column: 24
- },
- end: {
- line: 11,
- column: 3
- }
- },
- '4': {
- start: {
- line: 13,
- column: 2
- },
- end: {
- line: 65,
- column: 4
- }
- },
- '5': {
- start: {
- line: 14,
- column: 4
- },
- end: {
- line: 64,
- column: 5
- }
- },
- '6': {
- start: {
- line: 15,
- column: 6
- },
- end: {
- line: 19,
- column: 7
- }
- },
- '7': {
- start: {
- line: 20,
- column: 11
- },
- end: {
- line: 64,
- column: 5
- }
- },
- '8': {
- start: {
- line: 21,
- column: 6
- },
- end: {
- line: 25,
- column: 7
- }
- },
- '9': {
- start: {
- line: 26,
- column: 11
- },
- end: {
- line: 64,
- column: 5
- }
- },
- '10': {
- start: {
- line: 27,
- column: 6
- },
- end: {
- line: 33,
- column: 7
- }
- },
- '11': {
- start: {
- line: 34,
- column: 11
- },
- end: {
- line: 64,
- column: 5
- }
- },
- '12': {
- start: {
- line: 35,
- column: 6
- },
- end: {
- line: 37,
- column: 7
- }
- },
- '13': {
- start: {
- line: 38,
- column: 11
- },
- end: {
- line: 64,
- column: 5
- }
- },
- '14': {
- start: {
- line: 39,
- column: 6
- },
- end: {
- line: 44,
- column: 7
- }
- },
- '15': {
- start: {
- line: 41,
- column: 33
- },
- end: {
- line: 41,
- column: 60
- }
- },
- '16': {
- start: {
- line: 42,
- column: 30
- },
- end: {
- line: 42,
- column: 107
- }
- },
- '17': {
- start: {
- line: 43,
- column: 53
- },
- end: {
- line: 43,
- column: 109
- }
- },
- '18': {
- start: {
- line: 45,
- column: 11
- },
- end: {
- line: 64,
- column: 5
- }
- },
- '19': {
- start: {
- line: 46,
- column: 6
- },
- end: {
- line: 54,
- column: 7
- }
- },
- '20': {
- start: {
- line: 51,
- column: 60
- },
- end: {
- line: 51,
- column: 80
- }
- },
- '21': {
- start: {
- line: 55,
- column: 11
- },
- end: {
- line: 64,
- column: 5
- }
- },
- '22': {
- start: {
- line: 56,
- column: 22
- },
- end: {
- line: 56,
- column: 51
- }
- },
- '23': {
- start: {
- line: 57,
- column: 6
- },
- end: {
- line: 63,
- column: 7
- }
- },
- '24': {
- start: {
- line: 67,
- column: 2
- },
- end: {
- line: 71,
- column: 3
- }
- },
- '25': {
- start: {
- line: 68,
- column: 4
- },
- end: {
- line: 70,
- column: 5
- }
- },
- '26': {
- start: {
- line: 69,
- column: 62
- },
- end: {
- line: 69,
- column: 118
- }
- },
- '27': {
- start: {
- line: 73,
- column: 2
- },
- end: {
- line: 80,
- column: 3
- }
- },
- '28': {
- start: {
- line: 74,
- column: 4
- },
- end: {
- line: 79,
- column: 5
- }
- },
- '29': {
- start: {
- line: 76,
- column: 61
- },
- end: {
- line: 76,
- column: 117
- }
- },
- '30': {
- start: {
- line: 82,
- column: 2
- },
- end: {
- line: 82,
- column: 28
- }
- },
- '31': {
- start: {
- line: 83,
- column: 2
- },
- end: {
- line: 83,
- column: 15
- }
- }
- },
- fnMap: {
- '0': {
- name: '(anonymous_0)',
- decl: {
- start: {
- line: 3,
- column: 15
- },
- end: {
- line: 3,
- column: 16
- }
- },
- loc: {
- start: {
- line: 3,
- column: 49
- },
- end: {
- line: 84,
- column: 1
- }
- },
- line: 3
- },
- '1': {
- name: '(anonymous_1)',
- decl: {
- start: {
- line: 13,
- column: 20
- },
- end: {
- line: 13,
- column: 21
- }
- },
- loc: {
- start: {
- line: 13,
- column: 32
- },
- end: {
- line: 65,
- column: 3
- }
- },
- line: 13
- },
- '2': {
- name: '(anonymous_2)',
- decl: {
- start: {
- line: 41,
- column: 18
- },
- end: {
- line: 41,
- column: 19
- }
- },
- loc: {
- start: {
- line: 41,
- column: 33
- },
- end: {
- line: 41,
- column: 60
- }
- },
- line: 41
- },
- '3': {
- name: '(anonymous_3)',
- decl: {
- start: {
- line: 42,
- column: 15
- },
- end: {
- line: 42,
- column: 16
- }
- },
- loc: {
- start: {
- line: 42,
- column: 30
- },
- end: {
- line: 42,
- column: 107
- }
- },
- line: 42
- },
- '4': {
- name: '(anonymous_4)',
- decl: {
- start: {
- line: 43,
- column: 18
- },
- end: {
- line: 43,
- column: 19
- }
- },
- loc: {
- start: {
- line: 43,
- column: 53
- },
- end: {
- line: 43,
- column: 109
- }
- },
- line: 43
- },
- '5': {
- name: '(anonymous_5)',
- decl: {
- start: {
- line: 51,
- column: 54
- },
- end: {
- line: 51,
- column: 55
- }
- },
- loc: {
- start: {
- line: 51,
- column: 60
- },
- end: {
- line: 51,
- column: 80
- }
- },
- line: 51
- },
- '6': {
- name: '(anonymous_6)',
- decl: {
- start: {
- line: 69,
- column: 27
- },
- end: {
- line: 69,
- column: 28
- }
- },
- loc: {
- start: {
- line: 69,
- column: 62
- },
- end: {
- line: 69,
- column: 118
- }
- },
- line: 69
- },
- '7': {
- name: '(anonymous_7)',
- decl: {
- start: {
- line: 76,
- column: 26
- },
- end: {
- line: 76,
- column: 27
- }
- },
- loc: {
- start: {
- line: 76,
- column: 61
- },
- end: {
- line: 76,
- column: 117
- }
- },
- line: 76
- }
- },
- branchMap: {
- '0': {
- loc: {
- start: {
- line: 14,
- column: 4
- },
- end: {
- line: 64,
- column: 5
- }
- },
- type: 'if',
- locations: [{
- start: {
- line: 14,
- column: 4
- },
- end: {
- line: 64,
- column: 5
- }
- }, {
- start: {
- line: 14,
- column: 4
- },
- end: {
- line: 64,
- column: 5
- }
- }],
- line: 14
- },
- '1': {
- loc: {
- start: {
- line: 20,
- column: 11
- },
- end: {
- line: 64,
- column: 5
- }
- },
- type: 'if',
- locations: [{
- start: {
- line: 20,
- column: 11
- },
- end: {
- line: 64,
- column: 5
- }
- }, {
- start: {
- line: 20,
- column: 11
- },
- end: {
- line: 64,
- column: 5
- }
- }],
- line: 20
- },
- '2': {
- loc: {
- start: {
- line: 26,
- column: 11
- },
- end: {
- line: 64,
- column: 5
- }
- },
- type: 'if',
- locations: [{
- start: {
- line: 26,
- column: 11
- },
- end: {
- line: 64,
- column: 5
- }
- }, {
- start: {
- line: 26,
- column: 11
- },
- end: {
- line: 64,
- column: 5
- }
- }],
- line: 26
- },
- '3': {
- loc: {
- start: {
- line: 34,
- column: 11
- },
- end: {
- line: 64,
- column: 5
- }
- },
- type: 'if',
- locations: [{
- start: {
- line: 34,
- column: 11
- },
- end: {
- line: 64,
- column: 5
- }
- }, {
- start: {
- line: 34,
- column: 11
- },
- end: {
- line: 64,
- column: 5
- }
- }],
- line: 34
- },
- '4': {
- loc: {
- start: {
- line: 38,
- column: 11
- },
- end: {
- line: 64,
- column: 5
- }
- },
- type: 'if',
- locations: [{
- start: {
- line: 38,
- column: 11
- },
- end: {
- line: 64,
- column: 5
- }
- }, {
- start: {
- line: 38,
- column: 11
- },
- end: {
- line: 64,
- column: 5
- }
- }],
- line: 38
- },
- '5': {
- loc: {
- start: {
- line: 45,
- column: 11
- },
- end: {
- line: 64,
- column: 5
- }
- },
- type: 'if',
- locations: [{
- start: {
- line: 45,
- column: 11
- },
- end: {
- line: 64,
- column: 5
- }
- }, {
- start: {
- line: 45,
- column: 11
- },
- end: {
- line: 64,
- column: 5
- }
- }],
- line: 45
- },
- '6': {
- loc: {
- start: {
- line: 50,
- column: 10
- },
- end: {
- line: 52,
- column: 49
- }
- },
- type: 'cond-expr',
- locations: [{
- start: {
- line: 51,
- column: 14
- },
- end: {
- line: 51,
- column: 82
- }
- }, {
- start: {
- line: 52,
- column: 14
- },
- end: {
- line: 52,
- column: 49
- }
- }],
- line: 50
- },
- '7': {
- loc: {
- start: {
- line: 55,
- column: 11
- },
- end: {
- line: 64,
- column: 5
- }
- },
- type: 'if',
- locations: [{
- start: {
- line: 55,
- column: 11
- },
- end: {
- line: 64,
- column: 5
- }
- }, {
- start: {
- line: 55,
- column: 11
- },
- end: {
- line: 64,
- column: 5
- }
- }],
- line: 55
- },
- '8': {
- loc: {
- start: {
- line: 67,
- column: 2
- },
- end: {
- line: 71,
- column: 3
- }
- },
- type: 'if',
- locations: [{
- start: {
- line: 67,
- column: 2
- },
- end: {
- line: 71,
- column: 3
- }
- }, {
- start: {
- line: 67,
- column: 2
- },
- end: {
- line: 71,
- column: 3
- }
- }],
- line: 67
- },
- '9': {
- loc: {
- start: {
- line: 73,
- column: 2
- },
- end: {
- line: 80,
- column: 3
- }
- },
- type: 'if',
- locations: [{
- start: {
- line: 73,
- column: 2
- },
- end: {
- line: 80,
- column: 3
- }
- }, {
- start: {
- line: 73,
- column: 2
- },
- end: {
- line: 80,
- column: 3
- }
- }],
- line: 73
- }
- },
- s: {
- '0': 0,
- '1': 0,
- '2': 0,
- '3': 0,
- '4': 0,
- '5': 0,
- '6': 0,
- '7': 0,
- '8': 0,
- '9': 0,
- '10': 0,
- '11': 0,
- '12': 0,
- '13': 0,
- '14': 0,
- '15': 0,
- '16': 0,
- '17': 0,
- '18': 0,
- '19': 0,
- '20': 0,
- '21': 0,
- '22': 0,
- '23': 0,
- '24': 0,
- '25': 0,
- '26': 0,
- '27': 0,
- '28': 0,
- '29': 0,
- '30': 0,
- '31': 0
- },
- f: {
- '0': 0,
- '1': 0,
- '2': 0,
- '3': 0,
- '4': 0,
- '5': 0,
- '6': 0,
- '7': 0
- },
- b: {
- '0': [0, 0],
- '1': [0, 0],
- '2': [0, 0],
- '3': [0, 0],
- '4': [0, 0],
- '5': [0, 0],
- '6': [0, 0],
- '7': [0, 0],
- '8': [0, 0],
- '9': [0, 0]
- },
- _coverageSchema: '332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'
- },
- coverage = global[gcv] || (global[gcv] = {});
- if (coverage[path] && coverage[path].hash === hash) {
- return coverage[path];
- }
- coverageData.hash = hash;
- return coverage[path] = coverageData;
- }();
- var generateBindingBody = (function (t, _ref) {
- var modifiers = _ref.modifiers,
- expression = _ref.expression;
- cov_28cz23z0dk.f[0]++;
- var callStatement = (cov_28cz23z0dk.s[0]++, t.expressionStatement(t.callExpression(expression, [t.identifier('$event'), t.spreadElement(t.identifier('attrs'))])));
- var result = (cov_28cz23z0dk.s[1]++, []);
- var conditions = (cov_28cz23z0dk.s[2]++, []);
- var keyConditions = (cov_28cz23z0dk.s[3]++, [t.unaryExpression('!', t.binaryExpression('in', t.stringLiteral('button'), t.identifier('$event')))]);
- cov_28cz23z0dk.s[4]++;
- modifiers.forEach(function (modifier) {
- cov_28cz23z0dk.f[1]++;
- cov_28cz23z0dk.s[5]++;
- if (modifier === 'stop') {
- cov_28cz23z0dk.b[0][0]++;
- cov_28cz23z0dk.s[6]++;
- result.push(t.expressionStatement(t.callExpression(t.memberExpression(t.identifier('$event'), t.identifier('stopPropagation')), [])));
- } else {
- cov_28cz23z0dk.b[0][1]++;
- cov_28cz23z0dk.s[7]++;
- if (modifier === 'prevent') {
- cov_28cz23z0dk.b[1][0]++;
- cov_28cz23z0dk.s[8]++;
- result.push(t.expressionStatement(t.callExpression(t.memberExpression(t.identifier('$event'), t.identifier('preventDefault')), [])));
- } else {
- cov_28cz23z0dk.b[1][1]++;
- cov_28cz23z0dk.s[9]++;
- if (modifier === 'self') {
- cov_28cz23z0dk.b[2][0]++;
- cov_28cz23z0dk.s[10]++;
- conditions.push(t.binaryExpression('!==', t.memberExpression(t.identifier('$event'), t.identifier('target')), t.memberExpression(t.identifier('$event'), t.identifier('currentTarget'))));
- } else {
- cov_28cz23z0dk.b[2][1]++;
- cov_28cz23z0dk.s[11]++;
- if (keyModifiers.includes(modifier)) {
- cov_28cz23z0dk.b[3][0]++;
- cov_28cz23z0dk.s[12]++;
- conditions.push(t.unaryExpression('!', t.memberExpression(t.identifier('$event'), t.identifier(`${modifier}Key`))));
- } else {
- cov_28cz23z0dk.b[3][1]++;
- cov_28cz23z0dk.s[13]++;
- if (modifier === 'bare') {
- cov_28cz23z0dk.b[4][0]++;
- cov_28cz23z0dk.s[14]++;
- conditions.push(keyModifiers.filter(function (keyModifier) {
- cov_28cz23z0dk.f[2]++;
- cov_28cz23z0dk.s[15]++;
- return !modifiers.has(keyModifier);
- }).map(function (keyModifier) {
- cov_28cz23z0dk.f[3]++;
- cov_28cz23z0dk.s[16]++;
- return t.memberExpression(t.identifier('$event'), t.identifier(`${keyModifier}Key`));
- }).reduce(function (leftCondition, rightCondition) {
- cov_28cz23z0dk.f[4]++;
- cov_28cz23z0dk.s[17]++;
- return t.logicalExpression('||', leftCondition, rightCondition);
- }));
- } else {
- cov_28cz23z0dk.b[4][1]++;
- cov_28cz23z0dk.s[18]++;
- if (aliases[modifier]) {
- cov_28cz23z0dk.b[5][0]++;
- cov_28cz23z0dk.s[19]++;
- keyConditions.push(t.callExpression(t.memberExpression(t.thisExpression(), t.identifier('_k')), [t.memberExpression(t.identifier('$event'), t.identifier('keyCode')), t.stringLiteral(modifier), Array.isArray(aliases[modifier]) ? (cov_28cz23z0dk.b[6][0]++, t.arrayExpression(aliases[modifier].map(function (el) {
- cov_28cz23z0dk.f[5]++;
- cov_28cz23z0dk.s[20]++;
- return t.numericLiteral(el);
- }))) : (cov_28cz23z0dk.b[6][1]++, t.numericLiteral(aliases[modifier]))]));
- } else {
- cov_28cz23z0dk.b[5][1]++;
- cov_28cz23z0dk.s[21]++;
- if (modifier.match(keyCodeRE)) {
- cov_28cz23z0dk.b[7][0]++;
- var keyCode = (cov_28cz23z0dk.s[22]++, +modifier.match(keyCodeRE)[1]);
- cov_28cz23z0dk.s[23]++;
- keyConditions.push(t.binaryExpression('!==', t.memberExpression(t.identifier('$event'), t.identifier('keyCode')), t.numericLiteral(keyCode)));
- } else {
- cov_28cz23z0dk.b[7][1]++;
- }
- }
- }
- }
- }
- }
- }
- });
- cov_28cz23z0dk.s[24]++;
- if (keyConditions.length > 1) {
- cov_28cz23z0dk.b[8][0]++;
- cov_28cz23z0dk.s[25]++;
- conditions.push(keyConditions.reduce(function (leftCondition, rightCondition) {
- cov_28cz23z0dk.f[6]++;
- cov_28cz23z0dk.s[26]++;
- return t.logicalExpression('&&', leftCondition, rightCondition);
- }));
- } else {
- cov_28cz23z0dk.b[8][1]++;
- }
- cov_28cz23z0dk.s[27]++;
- if (conditions.length > 0) {
- cov_28cz23z0dk.b[9][0]++;
- cov_28cz23z0dk.s[28]++;
- result.push(t.ifStatement(conditions.reduce(function (leftCondition, rightCondition) {
- cov_28cz23z0dk.f[7]++;
- cov_28cz23z0dk.s[29]++;
- return t.logicalExpression('||', leftCondition, rightCondition);
- }), t.returnStatement(t.nullLiteral())));
- } else {
- cov_28cz23z0dk.b[9][1]++;
- }
- cov_28cz23z0dk.s[30]++;
- result.push(callStatement);
- cov_28cz23z0dk.s[31]++;
- return result;
- });
- var cov_2jta5ux1ch = function () {
- var path = '/home/nick/Projects/babel-plugin-jsx-event-modifiers/src/generate-bindings-list.js',
- hash = 'f199c9e4c60d7dbdd94379c8a9a7443b1cc5d62f',
- global = new Function('return this')(),
- gcv = '__coverage__',
- coverageData = {
- path: '/home/nick/Projects/babel-plugin-jsx-event-modifiers/src/generate-bindings-list.js',
- statementMap: {
- '0': {
- start: {
- line: 4,
- column: 2
- },
- end: {
- line: 9,
- column: 3
- }
- },
- '1': {
- start: {
- line: 5,
- column: 4
- },
- end: {
- line: 8,
- column: 5
- }
- }
- },
- fnMap: {
- '0': {
- name: '(anonymous_0)',
- decl: {
- start: {
- line: 3,
- column: 15
- },
- end: {
- line: 3,
- column: 16
- }
- },
- loc: {
- start: {
- line: 3,
- column: 32
- },
- end: {
- line: 10,
- column: 1
- }
- },
- line: 3
- },
- '1': {
- name: '(anonymous_1)',
- decl: {
- start: {
- line: 4,
- column: 22
- },
- end: {
- line: 4,
- column: 23
- }
- },
- loc: {
- start: {
- line: 5,
- column: 4
- },
- end: {
- line: 8,
- column: 5
- }
- },
- line: 5
- }
- },
- branchMap: {},
- s: {
- '0': 0,
- '1': 0
- },
- f: {
- '0': 0,
- '1': 0
- },
- b: {},
- _coverageSchema: '332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'
- },
- coverage = global[gcv] || (global[gcv] = {});
- if (coverage[path] && coverage[path].hash === hash) {
- return coverage[path];
- }
- coverageData.hash = hash;
- return coverage[path] = coverageData;
- }();
- var generateBindingsList = (function (t, bindings) {
- cov_2jta5ux1ch.f[0]++;
- cov_2jta5ux1ch.s[0]++;
- return bindings.map(function (binding) {
- cov_2jta5ux1ch.f[1]++;
- cov_2jta5ux1ch.s[1]++;
- return t.arrowFunctionExpression([t.identifier('$event'), t.restElement(t.identifier('attrs'))], t.blockStatement(generateBindingBody(t, binding)));
- });
- });
- var cov_34300l8ld = function () {
- var path = '/home/nick/Projects/babel-plugin-jsx-event-modifiers/src/generate-spread-event.js',
- hash = '691af611be9161f1f796a7d48f0d856cdb5d2ae7',
- global = new Function('return this')(),
- gcv = '__coverage__',
- coverageData = {
- path: '/home/nick/Projects/babel-plugin-jsx-event-modifiers/src/generate-spread-event.js',
- statementMap: {
- '0': {
- start: {
- line: 3,
- column: 20
- },
- end: {
- line: 6,
- column: 1
- }
- },
- '1': {
- start: {
- line: 4,
- column: 20
- },
- end: {
- line: 4,
- column: 53
- }
- },
- '2': {
- start: {
- line: 5,
- column: 2
- },
- end: {
- line: 5,
- column: 119
- }
- }
- },
- fnMap: {
- '0': {
- name: '(anonymous_0)',
- decl: {
- start: {
- line: 3,
- column: 15
- },
- end: {
- line: 3,
- column: 16
- }
- },
- loc: {
- start: {
- line: 3,
- column: 20
- },
- end: {
- line: 6,
- column: 1
- }
- },
- line: 3
- },
- '1': {
- name: '(anonymous_1)',
- decl: {
- start: {
- line: 3,
- column: 20
- },
- end: {
- line: 3,
- column: 21
- }
- },
- loc: {
- start: {
- line: 3,
- column: 43
- },
- end: {
- line: 6,
- column: 1
- }
- },
- line: 3
- }
- },
- branchMap: {
- '0': {
- loc: {
- start: {
- line: 5,
- column: 50
- },
- end: {
- line: 5,
- column: 118
- }
- },
- type: 'cond-expr',
- locations: [{
- start: {
- line: 5,
- column: 75
- },
- end: {
- line: 5,
- column: 87
- }
- }, {
- start: {
- line: 5,
- column: 90
- },
- end: {
- line: 5,
- column: 118
- }
- }],
- line: 5
- }
- },
- s: {
- '0': 0,
- '1': 0,
- '2': 0
- },
- f: {
- '0': 0,
- '1': 0
- },
- b: {
- '0': [0, 0]
- },
- _coverageSchema: '332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'
- },
- coverage = global[gcv] || (global[gcv] = {});
- if (coverage[path] && coverage[path].hash === hash) {
- return coverage[path];
- }
- coverageData.hash = hash;
- return coverage[path] = coverageData;
- }();
- var _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"]) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } }; }();
- var generateSpreadEvent = (function (t) {
- cov_34300l8ld.f[0]++;
- cov_34300l8ld.s[0]++;
- return function (_ref) {
- var _ref2 = _slicedToArray(_ref, 2),
- event = _ref2[0],
- bindings = _ref2[1];
- cov_34300l8ld.f[1]++;
- var callbacks = (cov_34300l8ld.s[1]++, generateBindingsList(t, bindings));
- cov_34300l8ld.s[2]++;
- return t.objectProperty(t.stringLiteral(event), callbacks.length === 1 ? (cov_34300l8ld.b[0][0]++, callbacks[0]) : (cov_34300l8ld.b[0][1]++, t.arrayExpression(callbacks)));
- };
- });
- var cov_131o2j1ear = function () {
- var path = '/home/nick/Projects/babel-plugin-jsx-event-modifiers/src/index.js',
- hash = '014199d1d98abed5c3c5abff53ae757229b98206',
- global = new Function('return this')(),
- gcv = '__coverage__',
- coverageData = {
- path: '/home/nick/Projects/babel-plugin-jsx-event-modifiers/src/index.js',
- statementMap: {
- '0': {
- start: {
- line: 5,
- column: 34
- },
- end: {
- line: 28,
- column: 1
- }
- },
- '1': {
- start: {
- line: 9,
- column: 6
- },
- end: {
- line: 25,
- column: 8
- }
- },
- '2': {
- start: {
- line: 11,
- column: 29
- },
- end: {
- line: 11,
- column: 51
- }
- },
- '3': {
- start: {
- line: 12,
- column: 41
- },
- end: {
- line: 12,
- column: 87
- }
- },
- '4': {
- start: {
- line: 13,
- column: 25
- },
- end: {
- line: 13,
- column: 107
- }
- },
- '5': {
- start: {
- line: 13,
- column: 72
- },
- end: {
- line: 13,
- column: 106
- }
- },
- '6': {
- start: {
- line: 14,
- column: 10
- },
- end: {
- line: 23,
- column: 11
- }
- },
- '7': {
- start: {
- line: 15,
- column: 12
- },
- end: {
- line: 22,
- column: 13
- }
- }
- },
- fnMap: {
- '0': {
- name: '(anonymous_0)',
- decl: {
- start: {
- line: 5,
- column: 15
- },
- end: {
- line: 5,
- column: 16
- }
- },
- loc: {
- start: {
- line: 5,
- column: 34
- },
- end: {
- line: 28,
- column: 1
- }
- },
- line: 5
- },
- '1': {
- name: '(anonymous_1)',
- decl: {
- start: {
- line: 13,
- column: 65
- },
- end: {
- line: 13,
- column: 66
- }
- },
- loc: {
- start: {
- line: 13,
- column: 72
- },
- end: {
- line: 13,
- column: 106
- }
- },
- line: 13
- }
- },
- branchMap: {
- '0': {
- loc: {
- start: {
- line: 14,
- column: 10
- },
- end: {
- line: 23,
- column: 11
- }
- },
- type: 'if',
- locations: [{
- start: {
- line: 14,
- column: 10
- },
- end: {
- line: 23,
- column: 11
- }
- }, {
- start: {
- line: 14,
- column: 10
- },
- end: {
- line: 23,
- column: 11
- }
- }],
- line: 14
- }
- },
- s: {
- '0': 0,
- '1': 0,
- '2': 0,
- '3': 0,
- '4': 0,
- '5': 0,
- '6': 0,
- '7': 0
- },
- f: {
- '0': 0,
- '1': 0
- },
- b: {
- '0': [0, 0]
- },
- _coverageSchema: '332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'
- },
- coverage = global[gcv] || (global[gcv] = {});
- if (coverage[path] && coverage[path].hash === hash) {
- return coverage[path];
- }
- coverageData.hash = hash;
- return coverage[path] = coverageData;
- }();
- var index = (function (_ref) {
- var t = _ref.types;
- cov_131o2j1ear.f[0]++;
- cov_131o2j1ear.s[0]++;
- return {
- inherits: syntaxJsx,
- visitor: {
- Program(path) {
- cov_131o2j1ear.s[1]++;
- path.traverse({
- JSXOpeningElement(path) {
- var attributes = (cov_131o2j1ear.s[2]++, path.get('attributes'));
- var groupedEventAttributes = (cov_131o2j1ear.s[3]++, attributes.reduce(groupEventAttributes(t), {}));
- var events = (cov_131o2j1ear.s[4]++, Object.keys(groupedEventAttributes).map(function (key) {
- cov_131o2j1ear.f[1]++;
- cov_131o2j1ear.s[5]++;
- return [key, groupedEventAttributes[key]];
- }));
- cov_131o2j1ear.s[6]++;
- if (events.length > 0) {
- cov_131o2j1ear.b[0][0]++;
- cov_131o2j1ear.s[7]++;
- path.pushContainer('attributes', t.jSXSpreadAttribute(t.objectExpression([t.objectProperty(t.identifier('on'), t.objectExpression(events.map(generateSpreadEvent(t))))])));
- } else {
- cov_131o2j1ear.b[0][1]++;
- }
- }
- });
- }
- }
- };
- });
- module.exports = index;
|