How to use the segmentio-facade.Alias function in segmentio-facade

To help you get started, we’ve selected a few segmentio-facade 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 segmentio / analytics.js-core / lib / analytics.js View on Github external
if (is.fn(from)) (fn = from), (options = null), (from = null);
  if (is.object(from)) (options = from), (from = null);
  /* eslint-enable no-unused-expressions, no-sequences */

  var msg = this.normalize({
    options: options,
    previousId: from,
    userId: to
  });

  // Add the initialize integrations so the server-side ones can be disabled too
  if (this.options.integrations) {
    defaults(msg.integrations, this.options.integrations);
  }

  this._invoke('alias', new Alias(msg));

  this.emit('alias', to, from, options);
  this._callback(fn);
  return this;
};

segmentio-facade

Providing common fields for analytics integrations

MIT
Latest version published 4 years ago

Package Health Score

51 / 100
Full package analysis

Similar packages