How to use the @protobufjs/eventemitter.prototype function in @protobufjs/eventemitter

To help you get started, we’ve selected a few @protobufjs/eventemitter examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github rochdev / datadog-tracer-js / src / tracer.js View on Github external
tags: fields.tags,
      startTime: fields.startTime
    })
  }

  _inject (spanContext, format, carrier) {
    this._propagators[format].inject(spanContext, carrier)
    return this
  }

  _extract (format, carrier) {
    return this._propagators[format].extract(carrier)
  }
}

Object.assign(DatadogTracer.prototype, EventEmitter.prototype)

function getParent (references) {
  let parent = null

  if (references) {
    for (let i = 0; i < references.length; i++) {
      const ref = references[i]
      if (ref.type() === opentracing.REFERENCE_CHILD_OF) {
        parent = ref.referencedContext()
        break
      } else if (ref.type() === opentracing.REFERENCE_FOLLOWS_FROM) {
        if (!parent) {
          parent = ref.referencedContext()
        }
      }
    }

@protobufjs/eventemitter

A minimal event emitter.

BSD-3-Clause
Latest version published 8 years ago

Package Health Score

82 / 100
Full package analysis

Popular @protobufjs/eventemitter functions

Similar packages