Sha256: 5f010e03290200c06d64e5a77dffd65c44881d25562f7cdb03f73d63bdcd4645

Contents?: true

Size: 1.06 KB

Versions: 26

Compression:

Stored size: 1.06 KB

Contents

{"version":3,"sources":["../../../../src/core/utils/internal/pipeEvents.ts"],"sourcesContent":["import { Emitter, EventMap } from 'strict-event-emitter'\n\n/**\n * Pipes all emitted events from one emitter to another.\n */\nexport function pipeEvents<Events extends EventMap>(\n  source: Emitter<Events>,\n  destination: Emitter<Events>,\n): void {\n  const rawEmit: typeof source.emit & { _isPiped?: boolean } = source.emit\n\n  if (rawEmit._isPiped) {\n    return\n  }\n\n  const sourceEmit: typeof source.emit & { _isPiped?: boolean } =\n    function sourceEmit(this: typeof source, event, ...data) {\n      destination.emit(event, ...data)\n      return rawEmit.call(this, event, ...data)\n    }\n\n  sourceEmit._isPiped = true\n\n  source.emit = sourceEmit\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAKO,SAAS,WACd,QACA,aACM;AACN,QAAM,UAAuD,OAAO;AAEpE,MAAI,QAAQ,UAAU;AACpB;AAAA,EACF;AAEA,QAAM,aACJ,SAASA,YAAgC,UAAU,MAAM;AACvD,gBAAY,KAAK,OAAO,GAAG,IAAI;AAC/B,WAAO,QAAQ,KAAK,MAAM,OAAO,GAAG,IAAI;AAAA,EAC1C;AAEF,aAAW,WAAW;AAEtB,SAAO,OAAO;AAChB;","names":["sourceEmit"]}

Version data entries

26 entries across 26 versions & 1 rubygems

Version Path
clapton-0.0.26 lib/clapton/javascripts/node_modules/msw/lib/core/utils/internal/pipeEvents.js.map
clapton-0.0.25 lib/clapton/javascripts/node_modules/msw/lib/core/utils/internal/pipeEvents.js.map
clapton-0.0.24 lib/clapton/javascripts/node_modules/msw/lib/core/utils/internal/pipeEvents.js.map
clapton-0.0.23 lib/clapton/javascripts/node_modules/msw/lib/core/utils/internal/pipeEvents.js.map
clapton-0.0.22 lib/clapton/javascripts/node_modules/msw/lib/core/utils/internal/pipeEvents.js.map
clapton-0.0.21 lib/clapton/javascripts/node_modules/msw/lib/core/utils/internal/pipeEvents.js.map
clapton-0.0.20 lib/clapton/javascripts/node_modules/msw/lib/core/utils/internal/pipeEvents.js.map
clapton-0.0.19 lib/clapton/javascripts/node_modules/msw/lib/core/utils/internal/pipeEvents.js.map
clapton-0.0.18 lib/clapton/javascripts/node_modules/msw/lib/core/utils/internal/pipeEvents.js.map
clapton-0.0.17 lib/clapton/javascripts/node_modules/msw/lib/core/utils/internal/pipeEvents.js.map
clapton-0.0.16 lib/clapton/javascripts/node_modules/msw/lib/core/utils/internal/pipeEvents.js.map
clapton-0.0.15 lib/clapton/javascripts/node_modules/msw/lib/core/utils/internal/pipeEvents.js.map
clapton-0.0.14 lib/clapton/javascripts/node_modules/msw/lib/core/utils/internal/pipeEvents.js.map
clapton-0.0.13 lib/clapton/javascripts/node_modules/msw/lib/core/utils/internal/pipeEvents.js.map
clapton-0.0.12 lib/clapton/javascripts/node_modules/msw/lib/core/utils/internal/pipeEvents.js.map
clapton-0.0.11 lib/clapton/javascripts/node_modules/msw/lib/core/utils/internal/pipeEvents.js.map
clapton-0.0.10 lib/clapton/javascripts/node_modules/msw/lib/core/utils/internal/pipeEvents.js.map
clapton-0.0.9 lib/clapton/javascripts/node_modules/msw/lib/core/utils/internal/pipeEvents.js.map
clapton-0.0.8 lib/clapton/javascripts/node_modules/msw/lib/core/utils/internal/pipeEvents.js.map
clapton-0.0.7 lib/clapton/javascripts/node_modules/msw/lib/core/utils/internal/pipeEvents.js.map